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

[CAT-172] 툴팁 구현 #19

Merged
merged 6 commits into from
Aug 10, 2024
Merged

[CAT-172] 툴팁 구현 #19

merged 6 commits into from
Aug 10, 2024

Conversation

devMinseok
Copy link
Member

@devMinseok devMinseok commented Aug 8, 2024

무엇에 관한 PR 인가요? 🙋

  • 툴팁 구현

어떤 것을 작업하셨나요? 🛠

  • 툴팁 컴포넌트 추가

🌱 PR Point

  • 사용방법은 디자인시스템 데모앱 모듈의 TokenDetailView 참고
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-08-09.at.03.27.21.mp4

@devMinseok devMinseok added the enhancement New feature or request label Aug 8, 2024
@devMinseok devMinseok self-assigned this Aug 8, 2024
Copy link

linear bot commented Aug 8, 2024

CAT-172 [iOS] 툴팁

@devMinseok devMinseok requested a review from Jihyun247 August 8, 2024 18:37
Jihyun247
Jihyun247 previously approved these changes Aug 9, 2024
Copy link
Collaborator

@Jihyun247 Jihyun247 left a comment

Choose a reason for hiding this comment

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

이번에도 데모앱 / 구현부 왔다갔다 수십번을 하며 이해했ㄷr ... 신기하네요 고생햇슴다

Comment on lines +17 to +20
.preference(
key: FrameMeasurePreferenceKey.self,
value: [identifier: geometry.frame(in: .global)]
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

요것은 툴팁의 위치를 정하기 위해 상위뷰(데모앱 버튼)의 크기를 알기 위한 Preference 키인가욥 ?
이것을 이용해서 툴팁 위치를 정하는게 tooltipDestination이고 ? ?

Copy link
Member Author

Choose a reason for hiding this comment

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

맞아맞아 툴팁의 타겟이 되는 View의 위치(CGPoint)와 크기(CGSize)를 받아서 tooltipDestination이 TooltipView의 위치를 정해주는거야

Copy link
Member Author

Choose a reason for hiding this comment

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

그리고 툴팁의 타겟에 바로 overlay하지 않고 tooltipDestination을 써서 최상위뷰에서 overlay하는 이유는 dim과 같이 전체 영역을 덮어야 하는 경우를 고려하기 위해서이고!

Comment on lines +53 to +56
ExcludeRoundedRectMask(
excludedRect: position,
cornerRadius: content.targetCornerRadius ?? .zero
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

오 ... 프리퍼런스키로 받은 지오메트리가 지오딤을 해줄 땐 버튼은 제외해주기 위해 쓰이기도 하는구나

Copy link
Member Author

Choose a reason for hiding this comment

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

그치 대신에 여기서 아쉬운점은 위치와 영역은 알 수 있어서 문제 없이 마스킹해줬지만 cornerRadius는 별도로 지정해줘야한다는거지 ㅠ

@devMinseok
Copy link
Member Author

devMinseok commented Aug 10, 2024

버튼 및 폰트 개선 작업 추가 기존 코드는 변경 필요없음

@devMinseok devMinseok merged commit e6aa32d into develop Aug 10, 2024
1 check passed
@devMinseok devMinseok deleted the feature/CAT-172 branch August 10, 2024 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants