-
Notifications
You must be signed in to change notification settings - Fork 0
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] #21 - 공통 버튼 구현 #27
Conversation
case signIn = "회원가입" | ||
case next = "다음" | ||
case confirm = "확인" | ||
case duplicate = "중복 확인" |
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.
P1:
"중복확인" 으로 변경 부탁드려요 !
띄어쓰기가 없어야 하는 것 같숩니다 !
private func setUI() { | ||
makeCornerRound(radius: 11) | ||
titleLabel?.font = .pretendardMedium(18) | ||
} |
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.
Q:
훔 제가 then 을 처음 써봐서 어느 상황에서는 property.do { ~~ }
를 쓸지,
어느 상황에서 property.font
이런식으로 쓸지 모르겠어서 그냥 다 전자로 통일시키긴 했거든요 ... ??
혹시 이에 대한 기준이 있을까여 ..??
func setButtonTitle(_ title: ButtonTitle) { | ||
setTitle(title.rawValue, for: .normal) | ||
} | ||
|
||
func setButtonUI(_ color: UIColor, _ border: UIColor? = .clear) { | ||
self.backgroundColor = color | ||
|
||
switch color { | ||
case .gbbMain3!, .gbbGray700!: setTitleColor(.gbbGray100, for: .normal) | ||
case .gbbMain2!: setTitleColor(.white, for: .normal) | ||
default: | ||
setTitleColor(.gbbGray400, for: .normal) | ||
} | ||
|
||
if let border = border { | ||
makeBorder(width: 1, color: border) | ||
if border != .clear { | ||
setTitleColor(border, for: .normal) | ||
} | ||
} | ||
} | ||
|
||
func setAction(completion: ((UIAction) -> Void)? = nil) { | ||
let action = UIAction { action in | ||
completion?(action) | ||
} | ||
addAction(action, for: .touchUpInside) | ||
} |
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.
Q:
훔... 요건 논의해보면 좋을 것 같은 부분인데,
(정말 개인적인 코드 스타일) 저는 init
또는 viewDidLoad
에 들어가는 함수들만 set
을 앞에 붙였거든요 !
그 외에 설정하는 함수들은 configure
를 앞에 붙이고 쓰고 있습니다 !
오늘부터 합숙 시작하니까, 논의해보면 좋을 것 같아요 !!
enum ButtonTitle: String, CaseIterable { | ||
|
||
case login = "로그인" | ||
case signIn = "회원가입" | ||
case next = "다음" | ||
case confirm = "확인" | ||
case duplicate = "중복 확인" | ||
case write = "작성하기" | ||
case start = "시작하기" | ||
|
||
} |
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.
P2:
훔 근데 Strings.swift 파일에 지정해 두었는데 여기서 또 텍스트로 작성하신 이유가 있을까요 ??
없다면 Strings.swift 파일의 값들 삭제 부탁드립니다 !
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.
고생하셨어요 !!
P2 한 가지 남겨서 고 부분만 확인해주시면 어프루브 해드리겠습니다 !
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.
굳굳 !!
빠른 머지 부탁 !
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.
어뿌룹
private func setUI() { | ||
self.do { | ||
$0.makeCornerRound(radius: 11) | ||
$0.titleLabel?.font = .pretendardMedium(18) |
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.
P1:
이거 텍스트 스타일 headLine으로 바꿔주세요~ (headLine 서체 pretendard medium으로 바꿔놓음)
🌁 Background
📱 Screenshot
👩💻 Contents
✅ Testing
뷰컨트롤러에서 작업하시는 경우 아래와 같이 레이아웃을 잡으시면 됩니다!
📝 Review Note
📣 Related Issue
📬 Reference