-
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: 강제 업데이트 팝업 뷰 UI 구현 (#381) #382
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
fffddbd
chore: 이미지 에셋 추가 (#381)
hyun99999 7817979
chore: pod update (#381)
hyun99999 5f8e44a
chore: 이미지 에셋 추가 (#381)
hyun99999 a403174
add: UpdateViewController 생성 (#381)
hyun99999 2177b3d
feat: Components 추가 및 초기 UI 설정
hyun99999 8d0a8ad
chore: pod update (#381)
hyun99999 381da3e
feat: UI 구현 (#381)
hyun99999 34e0c21
feat: flex container 사용 (#381)
hyun99999 db80377
fix: 업데이트 뷰 크기 고정 (#381)
hyun99999 b94f40f
feat: checkBoxButton 액션 추가 (#381)
hyun99999 abf8b92
add: updateContentLabel 속성 추가 (#381)
hyun99999 5dddd37
feat: rootFlexContainer item 레이아웃 지정 (#381)
hyun99999 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainGoUpdate.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "btnMainGoUpdate.png", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "btnMainGoUpdate@2x.png", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "btnMainGoUpdate@3x.png", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Binary file added
BIN
+918 Bytes
...se/Resouces/Assets/Assets.xcassets/btnMainGoUpdate.imageset/btnMainGoUpdate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.51 KB
...Resouces/Assets/Assets.xcassets/btnMainGoUpdate.imageset/btnMainGoUpdate@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.07 KB
...Resouces/Assets/Assets.xcassets/btnMainGoUpdate.imageset/btnMainGoUpdate@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnCheckboxFilled.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"scale" : "1x", | ||
"filename" : "icnCheckboxFilled.png", | ||
"idiom" : "universal" | ||
}, | ||
{ | ||
"scale" : "2x", | ||
"filename" : "icnCheckboxFilled@2x.png", | ||
"idiom" : "universal" | ||
}, | ||
{ | ||
"scale" : "3x", | ||
"idiom" : "universal", | ||
"filename" : "icnCheckboxFilled@3x.png" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Binary file added
BIN
+213 Bytes
...esouces/Assets/Assets.xcassets/icnCheckboxFilled.imageset/icnCheckboxFilled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+274 Bytes
...uces/Assets/Assets.xcassets/icnCheckboxFilled.imageset/icnCheckboxFilled@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+305 Bytes
...uces/Assets/Assets.xcassets/icnCheckboxFilled.imageset/icnCheckboxFilled@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
...iOS-forRelease/Resouces/Assets/Assets.xcassets/icnCheckboxUnfilled.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "icnCheckboxUnfilled.png", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x", | ||
"filename" : "icnCheckboxUnfilled@2x.png" | ||
}, | ||
{ | ||
"scale" : "3x", | ||
"idiom" : "universal", | ||
"filename" : "icnCheckboxUnfilled@3x.png" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Binary file added
BIN
+168 Bytes
...ces/Assets/Assets.xcassets/icnCheckboxUnfilled.imageset/icnCheckboxUnfilled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+195 Bytes
.../Assets/Assets.xcassets/icnCheckboxUnfilled.imageset/icnCheckboxUnfilled@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+228 Bytes
.../Assets/Assets.xcassets/icnCheckboxUnfilled.imageset/icnCheckboxUnfilled@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgUpdate.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "imgUpdate.png", | ||
"scale" : "1x", | ||
"idiom" : "universal" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "imgUpdate@2x.png", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"scale" : "3x", | ||
"idiom" : "universal", | ||
"filename" : "imgUpdate@3x.png" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Binary file added
BIN
+2.98 KB
...iOS-forRelease/Resouces/Assets/Assets.xcassets/imgUpdate.imageset/imgUpdate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.69 KB
...-forRelease/Resouces/Assets/Assets.xcassets/imgUpdate.imageset/imgUpdate@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.77 KB
...-forRelease/Resouces/Assets/Assets.xcassets/imgUpdate.imageset/imgUpdate@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
130 changes: 130 additions & 0 deletions
130
NADA-iOS-forRelease/Sources/ViewControllers/Update/VC/UpdateViewController.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
// | ||
// UpdateViewController.swift | ||
// NADA-iOS-forRelease | ||
// | ||
// Created by kimhyungyu on 2023/03/21. | ||
// | ||
|
||
import UIKit | ||
|
||
import FlexLayout | ||
import PinLayout | ||
|
||
class UpdateViewController: UIViewController { | ||
|
||
// MARK: - Components | ||
|
||
private let rootFlexContainer = UIView() | ||
private let updateCardImageView = UIImageView() | ||
private let cancelButton = UIButton() | ||
private let updateContentLabel = UILabel() | ||
private let checkBoxButton = UIButton() | ||
private let checkLabel = UILabel() | ||
private let updateButton = UIButton() | ||
|
||
// MARK: - View Life Cycle | ||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
|
||
setUI() | ||
addTargets() | ||
setLayout() | ||
} | ||
|
||
override func viewDidLayoutSubviews() { | ||
super.viewDidLayoutSubviews() | ||
|
||
rootFlexContainer.pin.vCenter().hCenter().height(487).width(327) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. 맞심더! 체이닝으로 스유의 느낌이나고 실제로 장점중에서도 그렇게 다가온거같아여! |
||
rootFlexContainer.flex.layout() | ||
} | ||
} | ||
|
||
// MARK: - Extension | ||
|
||
extension UpdateViewController { | ||
private func setUI() { | ||
view.backgroundColor = .black.withAlphaComponent(0.4) | ||
|
||
rootFlexContainer.backgroundColor = .background | ||
rootFlexContainer.layer.cornerRadius = 20 | ||
|
||
updateCardImageView.image = UIImage(named: "imgUpdate") | ||
|
||
cancelButton.setImage(UIImage(named: "iconClear"), for: .normal) | ||
|
||
updateContentLabel.numberOfLines = 10 | ||
updateContentLabel.font = .textRegular04 | ||
updateContentLabel.textColor = .secondary | ||
updateContentLabel.lineBreakMode = .byCharWrapping | ||
updateContentLabel.text = """ | ||
안녕하세요, 나다입니다. | ||
이번 업데이트에서는 아래와 같은 내용이 개선되었습니다. | ||
안녕하세융 | ||
나다에요 | ||
-명함을 위젯으로 추가할 수 있어요 | ||
-내 주변의 명함을 검색할 수 있어요 | ||
ㅇㅇㅇ | ||
앱스토어에서 최신 버전을 확인해 보세요! | ||
이정도면 10줄! | ||
""" | ||
|
||
checkBoxButton.setImage(UIImage(named: "icnCheckboxUnfilled"), for: .normal) | ||
checkBoxButton.setImage(UIImage(named: "icnCheckboxFilled"), for: .selected) | ||
|
||
checkLabel.font = .textRegular05 | ||
checkLabel.textColor = .tertiary | ||
checkLabel.text = "확인했어요!" | ||
|
||
updateButton.setImage(UIImage(named: "btnMainGoUpdate"), for: .normal) | ||
} | ||
|
||
private func addTargets() { | ||
cancelButton.addTarget(self, action: #selector(touchCancelButton), for: .touchUpInside) | ||
updateButton.addTarget(self, action: #selector(touchUpdateButton), for: .touchUpInside) | ||
checkBoxButton.addTarget(self, action: #selector(touchCheckBox), for: .touchUpInside) | ||
} | ||
|
||
// MARK: - Objc Methods | ||
|
||
@objc | ||
private func touchCancelButton() { | ||
// TODO: - 비강제 업데이트는 창 닫기. 강제 업데이트는 앱 종료. | ||
} | ||
|
||
@objc | ||
private func touchUpdateButton() { | ||
// TODO: - 앱스토어로 연결 혹은 홈으로 연결하는 액션 구현. | ||
} | ||
|
||
@objc | ||
private func touchCheckBox(_ sender: UIButton) { | ||
// TODO: - 체크하게 되면 다시 띄어주지 않음 | ||
checkBoxButton.isSelected.toggle() | ||
} | ||
} | ||
|
||
// MARK: - Layout | ||
|
||
extension UpdateViewController { | ||
private func setLayout() { | ||
view.addSubview(rootFlexContainer) | ||
|
||
rootFlexContainer.flex.direction(.column).justifyContent(.spaceBetween).define { flex in | ||
flex.addItem().direction(.column).define { flex in | ||
flex.addItem().direction(.column).alignItems(.center).define { flex in | ||
flex.addItem(updateCardImageView).marginTop(20) | ||
flex.addItem(cancelButton).position(.absolute).top(20).right(20) | ||
} | ||
flex.addItem(updateContentLabel).marginTop(16).marginBottom(18).marginHorizontal(16) | ||
} | ||
flex.addItem().direction(.column).define { flex in | ||
flex.addItem().direction(.row).alignItems(.center).marginBottom(20).define { flex in | ||
flex.addItem(checkBoxButton).marginLeft(16).size(16) | ||
flex.addItem(checkLabel).marginLeft(2) | ||
} | ||
flex.addItem(updateButton).marginBottom(16).marginHorizontal(17) | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
이건 처음 보는 스택인데 많이 배워가도록 하겠습니다 신기하네요!!