Skip to content

Conversation

@cirtuare
Copy link
Contributor

@cirtuare cirtuare commented Aug 5, 2025

🐿️ Pull Requests

🪵 작업 브랜치

🥔 작업 내용

  • 장소 등록 (네이버 API) 관련

    • 제보 불가 알럿 관련 이슈 핫픽스
    • 장소등록 취소 알럿 추가
  • hasPreference (취향탐색 여부) 추가 및 네비게이션 로직 분기처리

    • PostLoginResponse에 hasPreference 추가
    • SplashVC, LoginVC, LoginModalVC에서 취향탐색 여부에 따른 네비게이션 분기처리 로직 수정
  • 글라스모피즘 렌더링 오류 잡기 : 앱 재진입 시 하얗게 뜨는 오류 해결

🚨 참고 사항

앱 재진입 시 글라스모피즘 렌더링 오류 잡는 걸 GlassmorphismView나 BaseVC / BaseNavVC로 빼고 싶었는데, 또 뺴면 적용이 안 되더라고요..? 우선 각 뷰에 직접 해놓고 조금 더 연구해보겠습니다 !!

💥 To be sure

  • 모든 뷰가 잘 실행되는지 다시 한 번 체크해주세요 !

🌰 Resolve issue

@cirtuare cirtuare added this to the Sprint - 4 milestone Aug 5, 2025
@cirtuare cirtuare requested a review from yurim830 August 5, 2025 11:53
@cirtuare cirtuare self-assigned this Aug 5, 2025
@cirtuare cirtuare added ❤️‍🩹 bug 버그수정 🌀 feature 새로운 기능 개발 🍓 수민 수민 labels Aug 5, 2025
Copy link
Collaborator

@yurim830 yurim830 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다! 리뷰 확인 부탁드려요!

Comment on lines +71 to +72
UserDefaults.standard.set(true,
forKey: StringLiterals.UserDefaults.hasVerifiedArea)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐿️ 줄바꿈 굳이 안 해도 될 것 같아요!

Comment on lines +130 to +131
hasVerifiedArea ? hasPreference ? NavigationUtils.navigateToTabBar() : NavigationUtils.naviateToLoginOnboarding() : NavigationUtils.navigateToOnboardingLocalVerification()

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

삼항연산자 중첩인데 오히려 깔끔하게 읽히네요...!! 굿굿

Comment on lines 137 to 146
private func setXButtonAction() {
let currentVC = pages[currentIndex]

if currentVC is SpotUploadSearchViewController {
setXButton(#selector(showQuitAlert))
} else {
setXButton(#selector(navigateToTabBar))
}
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐿️ SearchVC일 때만 Alert을 띄우는 이유가 궁금합니다!
이후 페이지에서도 동일하게 Alert을 띄워주는 편이 자연스럽지 않을까요?

🐿️🐿️🐿️
그리고 182, 193줄에서, 페이지가 넘어갈 때마다 이 메소드를 호출하시는 이유가 궁금합니다

setXButton 코드를 살펴보면 add된 액션을 remove하는 로직 없이 addTarget만 되는데,
그러면 페이지를 이동할 때마다 action이 쌓이게 되어,
결국 x버튼에 showQuitAlert과 navigateToTabBar 액션이 모두 등록될 것 같아서요.
혹시 제가 잘못 생각한거라면 설명해주시면 감사하겠습니다...!!!!

// BaseNavViewController
    func setXButton(_ action: Selector? = nil) {
        setButtonStyle(button: leftButton, image: .icXmark)
        guard let action else {
            setButtonAction(button: leftButton,
                            target: self,
                            action: #selector(xButtonTapped))
            return
        }
        setButtonAction(button: leftButton,
                        target: self,
                        action: action)
    }

    func setButtonAction(button: UIButton, target: Any, action: Selector) {
        button.addTarget(target, action: action, for: .touchUpInside)
    }

Copy link
Contributor Author

@cirtuare cirtuare Aug 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여러 번 중첩되는 거 맞는 것 같아요 ! 우선 다음과 같이 수정하겠습니다

private func setXButtonAction() {
       let currentVC = pages[currentIndex]
       
       leftButton.removeTarget(nil, action: nil, for: .touchUpInside)
       
       if currentVC is SpotUploadSearchViewController {
           setXButton(#selector(showQuitAlert))
       } else {
           setXButton(#selector(navigateToTabBar))
       }
   }

SearchVC에서만 알럿 띄우는 걸로 피그마를 이해했는데, 기획 측에 한 번 더 물어볼게요 ~

Comment on lines 100 to 105
NotificationCenter.default.addObserver(
self,
selector: #selector(appWillEnterForeground),
name: UIApplication.willEnterForegroundNotification,
object: nil
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐿️🐿️ 글래스모피즘 렌더링에 대해 많이 고민하고 해결책을 찾으신 것 같아요!! 최고👍👍

그런데 NotificationCenter에 옵저버를 등록하는 코드가 여러번 중복되는 것 같아요..!
ViewController extension에 아래처럼 메소드를 만들어서 self랑 @objc 코드만 입력해도 되도록 하면 어떨까요?

func addForegroundObserver(target: Any, action: Selector) {
    NotificationCenter.default.addObserver(target, selector: action, name: UIApplication.willEnterForegroundNotification, object: nil)
}

그리고 혹시 deinit 코드를 BaseVC에 넣어두는 건 위험하려나요.....?

Copy link
Contributor Author

@cirtuare cirtuare Aug 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

좋은 제안 감사합니다 !!! target: Any로 하면 안 돼서 다음과 같이 정의했습니다 ㅎㅎ

func addForegroundObserver(action: Selector) {
    NotificationCenter.default.addObserver(self, selector: action, name: UIApplication.willEnterForegroundNotification, object: nil)
}

BaseVC에 deinit 넣는 것도 반영했습니다 ! 문서에 따르면 자식 뷰컨의 deinit이 먼저 호출된 뒤, 부모 뷰컨의 deinit이 무조건 호출된다고 하네요

@cirtuare cirtuare merged commit 951e422 into develop Aug 6, 2025
@cirtuare cirtuare deleted the fix/#248 branch August 12, 2025 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

❤️‍🩹 bug 버그수정 🌀 feature 새로운 기능 개발 🍓 수민 수민

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FIX] 2.1.0 QA 관련 작업 및 취향탐색 여부에 따른 네비게이션 분기처리

3 participants