Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…ease into feature/TeamNADA#393
  • Loading branch information
hyun99999 committed Apr 11, 2023
2 parents 66318cf + b46a7f5 commit 2a18aa1
Show file tree
Hide file tree
Showing 21 changed files with 280 additions and 28 deletions.
20 changes: 20 additions & 0 deletions NADA-iOS-forRelease.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
77F2C0ED27632AA7007641E3 /* CardHarmony.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 77F2C0EC27632AA7007641E3 /* CardHarmony.storyboard */; };
77F47D93276C79B600414659 /* Header.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77F47D92276C79B600414659 /* Header.swift */; };
DBBB91E1639641F40C5B4416 /* Pods_NADA_iOS_forRelease.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4A2183AE0E469153221624A0 /* Pods_NADA_iOS_forRelease.framework */; };
F805588529C993E7002E8EA3 /* UpdateViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F805588429C993E7002E8EA3 /* UpdateViewController.swift */; };
F80975E92990A27400075B93 /* Widgets.intentdefinition in Sources */ = {isa = PBXBuildFile; fileRef = F838B66A298E5C5300D84340 /* Widgets.intentdefinition */; };
F80975EA2990A27900075B93 /* Widgets.intentdefinition in Sources */ = {isa = PBXBuildFile; fileRef = F838B66A298E5C5300D84340 /* Widgets.intentdefinition */; };
F811720027383097002742CF /* ChangeGroupRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F81171FF27383097002742CF /* ChangeGroupRequest.swift */; };
Expand Down Expand Up @@ -319,6 +320,7 @@
77F2C0EC27632AA7007641E3 /* CardHarmony.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = CardHarmony.storyboard; sourceTree = "<group>"; };
77F47D92276C79B600414659 /* Header.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Header.swift; sourceTree = "<group>"; };
7F4EE1D042EC783FA8528743 /* Pods-NADA-iOS-forRelease.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NADA-iOS-forRelease.debug.xcconfig"; path = "Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease.debug.xcconfig"; sourceTree = "<group>"; };
F805588429C993E7002E8EA3 /* UpdateViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UpdateViewController.swift; sourceTree = "<group>"; };
F81171FF27383097002742CF /* ChangeGroupRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChangeGroupRequest.swift; sourceTree = "<group>"; };
F822E7A82709CEB60020452C /* Notification.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Notification.swift; sourceTree = "<group>"; };
F8268DB827730B0100BF114B /* FirstCardAlertBottomSheetViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirstCardAlertBottomSheetViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -761,6 +763,22 @@
path = VC;
sourceTree = "<group>";
};
F805588329C993D0002E8EA3 /* Update */ = {
isa = PBXGroup;
children = (
F805588629C993EF002E8EA3 /* VC */,
);
path = Update;
sourceTree = "<group>";
};
F805588629C993EF002E8EA3 /* VC */ = {
isa = PBXGroup;
children = (
F805588429C993E7002E8EA3 /* UpdateViewController.swift */,
);
path = VC;
sourceTree = "<group>";
};
F82FF8222701FFE300E57F8B /* RequiredFlavor */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1139,6 +1157,7 @@
F8FC43A026C01F040033E151 /* ViewControllers */ = {
isa = PBXGroup;
children = (
F805588329C993D0002E8EA3 /* Update */,
77B4E7492990E4FC006098DC /* Home */,
397B750E2763A5DD004AEB03 /* OpenSource */,
397B75182763B5DA004AEB03 /* TeamNADA */,
Expand Down Expand Up @@ -1608,6 +1627,7 @@
77703157275005AA002CBD19 /* CardResultBottomSheetViewController.swift in Sources */,
F8D74DD8276C7FB60071E5FC /* UIImageView+Extension.swift in Sources */,
39D13565273FDB9C00B1A148 /* User.swift in Sources */,
F805588529C993E7002E8EA3 /* UpdateViewController.swift in Sources */,
77812947275F6EA3004B34F4 /* CardDetailViewController.swift in Sources */,
F822E7A92709CEB60020452C /* Notification.swift in Sources */,
F8C83FC5272FA2940009DF0D /* CardAPI.swift in Sources */,
Expand Down
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"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -268,35 +268,35 @@ extension CardCreationCategoryViewController {
make.bottom.equalToSuperview().inset(9)
}

jobBackgroundView.snp.makeConstraints { make in
diggingBackgroundView.snp.makeConstraints { make in
make.top.equalTo(basicBackgroundView.snp.bottom).offset(12)
make.leading.trailing.equalToSuperview().inset(24)
make.height.equalTo(basicBackgroundView.snp.width).multipliedBy(117.0 / 327.0)
}

jobTextlabel.snp.makeConstraints { make in
diggingTextlabel.snp.makeConstraints { make in
make.leading.equalToSuperview().inset(18)
make.bottom.equalToSuperview().inset(14)
}

jobImageView.snp.makeConstraints { make in
diggingImageView.snp.makeConstraints { make in
make.trailing.equalToSuperview().inset(24)
make.top.equalToSuperview().inset(11)
make.bottom.equalToSuperview().inset(9)
}

diggingBackgroundView.snp.makeConstraints { make in
jobBackgroundView.snp.makeConstraints { make in
make.top.equalTo(jobBackgroundView.snp.bottom).offset(12)
make.leading.trailing.equalToSuperview().inset(24)
make.height.equalTo(basicBackgroundView.snp.width).multipliedBy(117.0 / 327.0)
}

diggingTextlabel.snp.makeConstraints { make in
jobTextlabel.snp.makeConstraints { make in
make.leading.equalToSuperview().inset(18)
make.bottom.equalToSuperview().inset(14)
}

diggingImageView.snp.makeConstraints { make in
jobImageView.snp.makeConstraints { make in
make.trailing.equalToSuperview().inset(24)
make.top.equalToSuperview().inset(11)
make.bottom.equalToSuperview().inset(9)
Expand Down
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)
}
}
}
}
36 changes: 19 additions & 17 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,23 @@ target 'NADA-iOS-forRelease' do
use_frameworks!

# Pods for NADA-iOS-forRelease
pod 'Moya'
pod 'SkeletonView'
pod 'SwiftLint'
pod 'VerticalCardSwiper'
pod 'KakaoSDKCommon'
pod 'KakaoSDKUser'
pod 'KakaoSDKAuth'
pod 'IQKeyboardManagerSwift'
pod 'Kingfisher'
pod 'NVActivityIndicatorView'
pod 'Firebase/DynamicLinks'
pod 'lottie-ios'
pod 'Then'
pod 'SnapKit'
pod 'RxSwift'
pod 'RxCocoa'
pod 'Moya/RxSwift'
pod 'Moya'
pod 'SkeletonView'
pod 'SwiftLint'
pod 'VerticalCardSwiper'
pod 'KakaoSDKCommon'
pod 'KakaoSDKUser'
pod 'KakaoSDKAuth'
pod 'IQKeyboardManagerSwift'
pod 'Kingfisher'
pod 'NVActivityIndicatorView'
pod 'Firebase/DynamicLinks'
pod 'lottie-ios'
pod 'Then'
pod 'SnapKit'
pod 'RxSwift'
pod 'RxCocoa'
pod 'Moya/RxSwift'
pod 'FlexLayout'
pod 'PinLayout'
end
Loading

0 comments on commit 2a18aa1

Please sign in to comment.