-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat: BBToolTip Action 처리 및 마이그레이션 작업 해요 #693
base: develop
Are you sure you want to change the base?
Conversation
- BBAnimatable 로직 수정 - BBToolTipType xPosition, yPosition 분리 - BBToolTipAction Nested Type 추가
- BBBaseToolTIpView 내부 drawable Method 추가 - BBToolTip Class 추가 - BBDrawable protocol, extension 제거
- ToolTip 관련 주석 추가
- BBToolTip Layout을 frame 기반으로 로직 수정
…하기 위해 intrinsicContentSize 재정의 - BBTooltip contentView ContentView intrinsicContentSize 기반으로 로직 수정 - BBToolTipConfiguration maxWidth, maxHeight Properties 제거
- BBToolTip property, Intializer 수정
…into feat/#649-tooltip-modify
- BBTextToolTipView TouchControl 클릭시 Tooltip 사라지는 애니메이션 로직 제거
@@ -48,8 +48,8 @@ final public class MemoriesCalendarPageTitleView: BaseView<MemoriesCalendarTitle | |||
private func bindOutput(reactor: Reactor) { | |||
reactor.pulse(\.$hiddenTooltipView) | |||
.bind(with: self) { | |||
$1 ? $0.toolTipView.hidePopover() | |||
: $0.toolTipView.showPopover() | |||
$1 ? $0.toolTipView.hide() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이거 toolTipView에 rx 뚫어주는거 어때용 ?ㅎㅎ 바로 bind(to: tollTipView.rx.isHidden 이렇게 쓰게요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
확실히 Binder
따로 만들어 놓는게 가독성이 좋겠네요!!
- 따로 Binder 구현해 놓을게요
|
||
UIView.animate(withDuration: duration, delay: 0, options: options) { [weak self] in | ||
guard let self else { return } | ||
self.transform = CGAffineTransform.identity | ||
self.alpha = 1 | ||
self.contentView?.transform = CGAffineTransform.identity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
..UIView.animate는 weak self를 쓸 필요가 없다고 합니당...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아하 UIView.animate에는 쓸필요가 없네요 감사합니다 :)
- 추가로 GCD에도 쓸 필요가 없었네요 기존 GCD에 적용해 놨던
weak self
코드도 따로 이슈 파서 수정해 놓을 게요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고거는 왜 쓸 필요 없나여?! 저도 알려주세영
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
제가 이해한 바로는 GCD 같은 경우 타입 프로퍼티
, 타입 메서드
로 구성이 되어 있기때문에 weak self
를 사용하지 않아도 되요
- 다만 기존에 있던 작업을 다른 스레드에 보낸다면 순환 참조 문제가 발생 할 수 있다고 하더라고여
// | ||
|
||
import UIKit | ||
|
||
/// **UIBezierPath**, ** CALayer**, **CGMutablePath**을 활용한 draw 메서드를 정의하는 Protocol입니다. | ||
protocol BBDrawable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요거 없앤 이유가 있나영? 결국 메서드들은 쓰는 . 것같은뎅..?!
super.init(toolTipType: toolTipType) | ||
setupToolTipUI() | ||
setupToolTipContent() | ||
setupAutoLayount() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오타나써영!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
근데 여기는 왜 setupUI(), setupAttributes() 이렇ㄱ ㅔ안하구.. 따로 네이밍하셧나용?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
썸네일도 그러네영!! 확인해주세요옹
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오타, 네이밍 같이 수정해놓겠습니다 👍 👍
contentText: "모두가 참여한 날과 업로드한 사진 수로\n이 달의 친밀도를 측정합니다" | ||
) | ||
case let .waitingSurvivalImage(contentText, profile): | ||
return .init( | ||
foregroundColor: .bibbiBlack, | ||
backgroundColor: .mainYellow, | ||
position: .bottom, | ||
yPosition: .bottom, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
좋네영 ~! LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR에 적어주신 사용법 주석으로 tooltipview에도 적어주시면 안되나영?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
네넵 주석도 적용해놓을게요 💯
🔵PR을 올리기 전 아래 사항을 확인해주세요.
(위 내용은 지워주세요)
😽개요
text
,Thumbnail
로 모듈 분리하여 기능구현 하였습니다.🛠️작업 내용
BBBaseToolTipView
는 ToolTipView에 뼈대가 되는 ShapeLayer를 그리는 역할을 수행하도록 내부 구현을 했습니다.BBToolTip
을 통해서BBThumbnailToolTipView
,BBTextToolTipView
를 superView에 띄우도록 구현하였습니다.BBThumbnailToolTipView
는BBBaseToolTipView
를 상속받고 있기 때문에 오직Thumbnail
에 필요한 Layout과 기능 구현만 수행하도록 로직을 구현했습니다.BBTextToolTipView
도 위와 동일BBToolTip
은superView
Property를 통해 자동으로 Layout을 잡도록 구현했습니다. 때문에 AutoLayout을 선언하지 않고 Tooltip을 넣어줘야하는 view를 넣어주시기만 하면 됩니다.BBToolTip 사용 방법
✅테스트 케이스
🙏🏻아래와 같이 PR을 리뷰해주세요.