Skip to content

Conversation

@cirtuare
Copy link
Contributor

🐿️ Pull Requests

🪵 작업 브랜치

🥔 작업 내용

이 브랜치 풀 받으셔서 실행해보시고 이렇게 되는 게 아니면 알려주세요..!

변경사항

뷰 계층구조 변경

  • SpotUploadView를 삭제하고 previousButton, nextButton을 직접 SpotUploadVC에 추가했습니다
  • 기존 계층구조로는 하단 ACButton 변경사항을 적용해도 안 돼서, 아마 pageVC가 글모 렌더링에 관여하고 있는 거 아닐까 싶습니다 (잘은 모르겠음)

ACButton 변경사항

  1. applyGlassBorder 앞 guard문 추가 - bound 0일 때 보더 추가하지 않도록 함
private func applyGlassBorder(_ attributes: GlassBorderAttributes) {
    guard bounds.width > 0 && bounds.height > 0 else { return }
  1. applyGlassBorder에서 글모뷰 borderGlassmorphismView에 정의 (기존에 glassmorphismView에 정의하고 있었음)
// applyGlassBorder 메소드 중

borderGlassmorphismView = GlassmorphismView(attributes.glassmorphismType)

if let glassmorphismView = borderGlassmorphismView {
  1. layoutSubviews에서 !bounds.width.isNaN, !bounds.height.isNaN 조건과 existingView 조건을 추가했습니다. 디버깅해보니 보더가 여러 번 추가되고 있어서 해당 케이스들을 막았습니다!
 if let attributes = glassBorderAttributes,
   bounds.width > 0, bounds.height > 0,
    !bounds.width.isNaN, !bounds.height.isNaN {
    if let existingView = borderGlassmorphismView {
        if existingView.frame.size == bounds.size &&
            existingView.frame.width > 0 && existingView.frame.height > 0 {
            return
        }
    }
    applyGlassBorder(attributes)
}
  1. refreshBlurEffect 메소드에서 글모 배경을 설정해주는 setGlassmorphism 메소드를 glassmorphismType이 존재할 때만 호출하도록 수정하였습니다.
func refreshButtonBlurEffect(_ glassType: GlassmorphismType) {
      if buttonStyleType.glassmorphismType != nil {
          setGlassmorphism(glassType)
      }

📸 스크린샷

기능 스크린샷
아이폰 16 Pro

💥 To be sure

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

🌰 Resolve issue

@cirtuare cirtuare added this to the Sprint - 4 milestone Jul 19, 2025
@cirtuare cirtuare requested a review from yurim830 July 19, 2025 17:11
@cirtuare cirtuare self-assigned this Jul 19, 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 229 to 231
if let attributes = glassBorderAttributes,
bounds.width > 0, bounds.height > 0,
!bounds.width.isNaN, !bounds.height.isNaN {
Copy link
Collaborator

Choose a reason for hiding this comment

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

🐿️
bounds.width > 0, bounds.height > 0이 true라면
!bounds.width.isNaN, !bounds.height.isNaN도 항상 true 아닌가요?
로직에 추가하신 이유가 궁금합니다!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  • innerRect: (inf, inf, 0.0, 0.0)
  • innerPath bounds: (inf, inf, 0.0, 0.0) 로그가 찍히기 때문이었는데, 생각해보니 bounds 자체가 NaN인 게 아니라 필요없네요.. 🥲 삭제했습니다!!

Comment on lines -201 to +205
glassmorphismView = GlassmorphismView(attributes.glassmorphismType)
borderGlassmorphismView = GlassmorphismView(attributes.glassmorphismType)

if let glassmorphismView = glassmorphismView {
if let glassmorphismView = borderGlassmorphismView {
Copy link
Collaborator

Choose a reason for hiding this comment

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

와 이게 이렇게 돼있었구나..... 디버깅천재 이수민 ㅠㅠㅠ 감사합니다

@cirtuare cirtuare merged commit e9897a1 into develop Jul 21, 2025
@cirtuare cirtuare deleted the fix/#231 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FIX] 버튼 글라스모피즘 테두리 적용 안 되는 이슈 해결

3 participants