forked from TeamNADA/NADA-iOS-ForRelease
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/TeamNADA/NADA-iOS-ForRel…
…ease into feature/TeamNADA#384
- Loading branch information
Showing
21 changed files
with
280 additions
and
28 deletions.
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.
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
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) | ||
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
Oops, something went wrong.