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

[ADD] #78 - 명함생성 뷰 수정 #86

Merged
merged 2 commits into from
Nov 27, 2021

Conversation

hyun99999
Copy link
Member

🌴 PR 요약

🌱 작업한 브랜치

🌱 작업한 내용

뷰 수정

  • BackgroundCollectionViewCell 수정 뷰 적용(테두리 수정)
  • Front & BackCardCreationCollectionViewCell 수정 뷰 적용(placeholder, label 위치 및 색상 변경)
  • 버튼 iOS 13, 15(configuration) 대응해서 생성

다크모드

  • buttonBackground 다크모드 에셋 추가
  • iconArrow 다크모드 에셋 추가
  • FrontCardCell, RequiredFlavorCollectionViewCell 다크모드 적용

새로운 기능 추가

  • dismiss 시 alert 창 적용
  • alert 창 extension 추가

📸 스크린샷

기능 스크린샷
앞면
뒷면
미리보기 뷰
alert창

📮 관련 이슈

### 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 에러 수정해야함
@hyun99999 hyun99999 added Hyungyu 🐯 현규 교수님 작업 Add feat 이외의 부수적인 코드 추가 / 새로운 파일 생성 labels Nov 27, 2021
@hyun99999 hyun99999 self-assigned this Nov 27, 2021
Copy link
Member

@mini-min mini-min left a comment

Choose a reason for hiding this comment

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

고생하셨습니당~~!!
말씀해주신 backCardCell은 교수님 코드 참조하면서 수정해두겠습니당~~~!!

Comment on lines +24 to 27
// 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)
Copy link
Member

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.

그러면 제가 지워두겠습니당!

Comment on lines +40 to +58
/// 확인+취소 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)
}

Copy link
Member

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)
Copy link
Member

Choose a reason for hiding this comment

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

어이쿠 제것까지...감사합니다 교수님🙏🏻

Copy link
Member

Choose a reason for hiding this comment

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

세심해...

Comment on lines +46 to +53
override var isSelected: Bool {
didSet {
if isSelected {
bgView.isHidden = false
} else {
bgView.isHidden = true
}
}
Copy link
Member

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.

맞아요! 이렇게도 좋고 이준선배 코드 보면 삼항연산자로 표현했는데 그것도 좋은거 같아용!
한꺼번에 변수에 대해서 대응할 수 있어서 좋은거 같네용

Comment on lines +53 to +74
// 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)
}
Copy link
Member

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.

흠 아닙니당! 일단 사이드 프로젝트의 개념도 있었고 iOS 15 부터 configuration 이 생겨서 위에처럼 코드를 짤수가 있더라구요 그래서 한번적용해봤습니다! qa 를 거치면서(15 는 눌렸을 때 흐릿하게 else 는 어둡게 selected 되더라구요) 통일감을 가져가야할 때 결정되지 않을까 싶어요!

Copy link
Member

Choose a reason for hiding this comment

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

헐 이것까진 생각 못했는데 역시 15대응이라니.. 역시 교수님..

Comment on lines +98 to +99
// 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#>)
Copy link
Member

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.

넵! 🪓

Copy link
Member

@dlwns33 dlwns33 left a 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)
Copy link
Member

Choose a reason for hiding this comment

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

세심해...

Comment on lines +53 to +74
// 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)
}
Copy link
Member

Choose a reason for hiding this comment

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

헐 이것까진 생각 못했는데 역시 15대응이라니.. 역시 교수님..

@hyun99999 hyun99999 merged commit 45af004 into TeamNADA:develop Nov 27, 2021
@hyun99999 hyun99999 deleted the feature/#78 branch November 27, 2021 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Add feat 이외의 부수적인 코드 추가 / 새로운 파일 생성 Hyungyu 🐯 현규 교수님 작업
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ADD] 명함생성 뷰 수정
3 participants