-
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
[ADD] #78 - 명함생성 뷰 수정 #86
Conversation
### Descriptions - iconArrow 다크모드 에셋 추가 - alert 창 extension - FrontCardCell, RequiredFlavorCollectionViewCell 다크모드 적용 - BackgroundCollectionViewCell 수정 뷰 적용 - Front & BackCardCreationCollectionViewCell 수정 뷰 적용 ### fixme - @IBDesignable 에러 수정해야함 ### todo - 버튼 iOS 13,15 대응
### Descriptions - buttonBackground 다크모드 에셋 추가 - 버튼 iOS 13, 15(configuration) 대응해서 생성 - dismiss 시 alert 창 적용할 수 있도록 ### fixme - @IBDesignable 에러 수정해야함
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.
고생하셨습니당~~!!
말씀해주신 backCardCell은 교수님 코드 참조하면서 수정해두겠습니당~~~!!
// FIXME: - 민재선배 아래주석 삭제해도 되나요?? | ||
// alertViewController.setTitle(font: UIFont.boldSystemFont(ofSize: 17), color: UIColor.white) | ||
// alertViewController.setMessage(font: UIFont.systemFont(ofSize: 13), color: UIColor.white) | ||
// alertViewController.setTint(color: .mainBlue) |
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.
그러면 제가 지워두겠습니당!
/// 확인+취소 UIAlertController | ||
func makeOKCancelAlert(title: String, | ||
message: String, | ||
okAction: ((UIAlertAction) -> Void)?, | ||
cancelAction: ((UIAlertAction) -> Void)? = nil, | ||
completion: (() -> Void)? = nil) { | ||
let alertViewController = UIAlertController(title: title, | ||
message: message, | ||
preferredStyle: .alert) | ||
|
||
let okAction = UIAlertAction(title: "확인", style: .default, handler: okAction) | ||
alertViewController.addAction(okAction) | ||
|
||
let cancelAction = UIAlertAction(title: "취소", style: .cancel, handler: cancelAction) | ||
alertViewController.addAction(cancelAction) | ||
|
||
self.present(alertViewController, animated: true, completion: completion) | ||
} | ||
|
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.
어우 감사합니다ㅠㅜㅠㅜㅠㅜ
@@ -32,7 +32,7 @@ class BackCardCell: CardCell { | |||
|
|||
// MARK: - Functions | |||
static func nib() -> UINib { | |||
return UINib(nibName: "BackCardCell", bundle: nil) | |||
return UINib(nibName: Const.Xib.backCardCell, bundle: nil) |
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.
세심해...
override var isSelected: Bool { | ||
didSet { | ||
if isSelected { | ||
bgView.isHidden = false | ||
} else { | ||
bgView.isHidden = true | ||
} | ||
} |
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.
맞아요! 이렇게도 좋고 이준선배 코드 보면 삼항연산자로 표현했는데 그것도 좋은거 같아용!
한꺼번에 변수에 대해서 대응할 수 있어서 좋은거 같네용
// MARK: - #available(iOS 15.0, *) | ||
if #available(iOS 15.0, *) { | ||
var config = UIButton.Configuration.filled() | ||
config.background.cornerRadius = 15 | ||
config.baseBackgroundColor = .mainColorNadaMain | ||
config.baseForegroundColor = .white | ||
completeButton.configuration = config | ||
|
||
let configHandler: UIButton.ConfigurationUpdateHandler = { button in | ||
switch button.state { | ||
default: | ||
button.configuration?.title = "생성" | ||
} | ||
} | ||
completeButton.configurationUpdateHandler = configHandler | ||
} else { | ||
// TODO: - QA/iOS 13 테스트. selected 설정. | ||
completeButton.setTitle("생성", for: .normal) | ||
completeButton.layer.cornerRadius = 15 | ||
completeButton.setBackgroundImage(UIImage(named: "enableButtonBackground"), for: .normal) | ||
completeButton.setTitleColor(.white, for: .normal) | ||
} |
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.
흠 아닙니당! 일단 사이드 프로젝트의 개념도 있었고 iOS 15 부터 configuration 이 생겨서 위에처럼 코드를 짤수가 있더라구요 그래서 한번적용해봤습니다! qa 를 거치면서(15 는 눌렸을 때 흐릿하게 else 는 어둡게 selected 되더라구요) 통일감을 가져가야할 때 결정되지 않을까 싶어요!
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.
헐 이것까진 생각 못했는데 역시 15대응이라니.. 역시 교수님..
// TODO: - BackCardCell.initCell 수정되면 반영하기 | ||
// backCard.initCell("card", <#T##mintImage: String##String#>, <#T##noMintImage: String##String#>, <#T##sojuImage: String##String#>, <#T##beerImage: String##String#>, <#T##pourImage: String##String#>, <#T##putSauceImage: String##String#>, <#T##yangnyumImage: String##String#>, <#T##friedImage: String##String#>, <#T##firstTmi: String##String#>, <#T##secondTmi: String##String#>, <#T##thirdTmi: String##String#>) |
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.
컬러 바꾸느라 수고하셨어요 교수님... ㅠㅠㅠㅠ
@@ -32,7 +32,7 @@ class BackCardCell: CardCell { | |||
|
|||
// MARK: - Functions | |||
static func nib() -> UINib { | |||
return UINib(nibName: "BackCardCell", bundle: nil) | |||
return UINib(nibName: Const.Xib.backCardCell, bundle: nil) |
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.
세심해...
// MARK: - #available(iOS 15.0, *) | ||
if #available(iOS 15.0, *) { | ||
var config = UIButton.Configuration.filled() | ||
config.background.cornerRadius = 15 | ||
config.baseBackgroundColor = .mainColorNadaMain | ||
config.baseForegroundColor = .white | ||
completeButton.configuration = config | ||
|
||
let configHandler: UIButton.ConfigurationUpdateHandler = { button in | ||
switch button.state { | ||
default: | ||
button.configuration?.title = "생성" | ||
} | ||
} | ||
completeButton.configurationUpdateHandler = configHandler | ||
} else { | ||
// TODO: - QA/iOS 13 테스트. selected 설정. | ||
completeButton.setTitle("생성", for: .normal) | ||
completeButton.layer.cornerRadius = 15 | ||
completeButton.setBackgroundImage(UIImage(named: "enableButtonBackground"), for: .normal) | ||
completeButton.setTitleColor(.white, for: .normal) | ||
} |
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.
헐 이것까진 생각 못했는데 역시 15대응이라니.. 역시 교수님..
🌴 PR 요약
🌱 작업한 브랜치
🌱 작업한 내용
뷰 수정
다크모드
새로운 기능 추가
📸 스크린샷
📮 관련 이슈