Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

온보딩 - 로그인 디자인 & 기능 완성 #90

Closed
Prev Previous commit
Next Next commit
refactor #87: 햅틱 개선
  • Loading branch information
enebin committed Sep 2, 2023
commit 22bba19937a9b2b97b12856d53aa30b16daebf6c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ public class HapticManager {
generator.impactOccurred()
}

/// 붕
public func boong() {
let generator = UIImpactFeedbackGenerator(style: .soft)
generator.prepare()
generator.impactOccurred()
}

/// 패턴 재생(패턴은 추후 협의 후 개발해서 추가)
public func playHapticPattern() {
do {
Expand Down
2 changes: 1 addition & 1 deletion Projects/Features/Sources/Onboarding/OnboardingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public struct OnboardingView: View {
.foregroundColor(.black)
}
.onTapGesture {
HapticManager.shared.tok()
HapticManager.shared.boong()
viewStore.send(.nextButtonDidTap)
}
.padding(Padding.insets(leading: 16, trailing: 16))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ public struct RegistrationView: View {

// 다음 페이지로 넘어가기 위한 Button
Button(action: {
HapticManager.shared.boong()
viewStore.send(
.finishRegister(
nickname: viewStore.nicknameTextFieldString,
Expand Down
3 changes: 3 additions & 0 deletions Projects/Features/Sources/SignIn/SignInView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
//

import AuthenticationServices
import Core
import ComposableArchitecture
import DSKit
import SwiftUI
Expand Down Expand Up @@ -52,6 +53,7 @@ public struct SignInView: View {
var body: some View {
Button(action: {
store.send(.signInWithKakao)
HapticManager.shared.boong()
}) {
Image("kakao_login")
.resizable()
Expand All @@ -68,6 +70,7 @@ public struct SignInView: View {
var body: some View {
SignInWithAppleButton(
onRequest: { request in
HapticManager.shared.boong()
request.requestedScopes = [.fullName, .email]
},
onCompletion: { completion in
Expand Down