Skip to content

Conversation

@Guryss
Copy link
Member

@Guryss Guryss commented May 28, 2025

⭐️Issue


🌟Motivation

  • 상세탐색 모달 올라올 때 배경이 겹쳐 올라오는 현상 해결했습니다.
  • 모달 둥근 모서리 만드는 방법을 기존 extension 코드에서 layer.maskedCorners 프로퍼티로 변경했습니다.

🌟Key Changes

문제상황

상새 탐색뷰는 모달 형태로 보여져야 하기 떄문에 presentModalViewController라는 함수에 담겨 호출됩니다.
아래 코드를 보면 이미 모달 함수 내 배경색을 정의해주기 때문에 추가적인 배경색을 적용할 필요가 없었습니다.

해결

DetailSearchView UI 내 배경색을 정의하는 코드가 있어 모달이 올라올 때 배경이 겹쳐 보이는 현상이 발생했습니다.
해당 코드를 삭제하여 문제 해결했습니다.

func presentModalViewController(_ viewController: UIViewController) {
        guard let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene,
              let window = windowScene.windows.first else { return }
        
        let blackOverlayView = UIView(frame: window.bounds).then {
            $0.backgroundColor = UIColor.black.withAlphaComponent(0)
            $0.tag = 999
        }
        
        window.addSubview(blackOverlayView)
        
        blackOverlayView.snp.makeConstraints {
            $0.edges.equalToSuperview()
        }
        
        UIView.animate(withDuration: 0.3) {
            blackOverlayView.backgroundColor = UIColor.black.withAlphaComponent(0.6)
        }
        
        viewController.modalPresentationStyle = .overFullScreen
        self.present(viewController, animated: true)
    }
KakaoTalk_Video_2025-05-28-11-13-32.mp4

🌟Simulation

Simulator.Screen.Recording.-.iPhone.13.mini.-.2025-05-28.at.11.21.06.mp4

🌟To Reviewer

나기 감사 👍

🌟Reference


@Guryss Guryss marked this pull request as ready for review May 28, 2025 02:26
@Guryss Guryss added this to WSS-iOS May 28, 2025
@Guryss Guryss moved this to In Progress in WSS-iOS May 28, 2025
Copy link
Member

@ena-isme ena-isme left a comment

Choose a reason for hiding this comment

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

GOOD!

Copy link
Contributor

@Naknakk Naknakk left a comment

Choose a reason for hiding this comment

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

구십니다~~

@Guryss Guryss merged commit 89e5cc9 into Develop Jun 3, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in WSS-iOS Jun 3, 2025
@Guryss Guryss deleted the Fix/#574 branch June 3, 2025 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Fix] 상세탐색뷰 모달 올라올 때 backgroundView 같이 올라오는 현상 해결

4 participants