-
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
fix: 명함 공유 뷰 수정 (#349) #350
Conversation
- layout 작업 시에 UIView 배열로 뷰에 더하는 함수 생성.
- if 문을 사용하게 되면 줄이 두배 길어지고, 삼항연산자 사용하면 UI components 에 코드가 집중할 수 있다고 생각했습니다. - if-else 문에서 휴먼에러로 변경되는 UI 를 놓치지 않을 수 있습니다.
- 추후에 수정되어야 하기 때문에 주석 설정.
- lazy 로 선언해서 lottie image 를 사용하기 전까지 메모리에 올리지 않게 됨.
- 아직 선언되지 않은 컴포넌트의 액션 메서드를 적용하기 위해서 addTarget() 에서 self 를 사용하면 이는 예상못할 수 있기 때문에 lazy 하게 만들어야 안전합니다.
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.
수고하셨습니다 선생님! 기기 대응되니까 훨씬 더 보기 좋네요 !
cardBackgroundView.translatesAutoresizingMaskIntoConstraints = false | ||
NSLayoutConstraint.activate([ | ||
cardBackgroundView.topAnchor.constraint(equalTo: titleLabel.bottomAnchor, constant: 20.0), | ||
cardBackgroundView.leadingAnchor.constraint(equalTo: bottomSheetView.leadingAnchor, constant: 24.0), | ||
cardBackgroundView.trailingAnchor.constraint(equalTo: bottomSheetView.trailingAnchor, constant: -24.0), | ||
cardBackgroundView.heightAnchor.constraint(equalToConstant: 384.0) | ||
]) | ||
|
||
nadaLogoImage.translatesAutoresizingMaskIntoConstraints = false | ||
NSLayoutConstraint.activate([ | ||
nadaLogoImage.topAnchor.constraint(equalTo: cardBackgroundView.topAnchor, constant: 18.0), | ||
nadaLogoImage.leadingAnchor.constraint(equalTo: cardBackgroundView.leadingAnchor, constant: 18.0), | ||
nadaLogoImage.widthAnchor.constraint(equalToConstant: 84.0), | ||
nadaLogoImage.heightAnchor.constraint(equalToConstant: 30.0) | ||
]) | ||
|
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.
놀랍게도 이 프로젝트는 스냅킷이 인스톨되어있지 않아요 ㅋㅋㅋㅋㅋ 우리가 그때 없이 해보자고 한거 같아여
불편하면 추가해도 좋아요!
🌴 PR 요약
🌱 작업한 브랜치
🌱 작업한 내용
🚨 참고사항
구현 영상
코드
lazy
SwiftLint
self_in_property_initialization
워닝을 제거하였습니다.📸 스크린샷
📮 관련 이슈