Skip to content

Commit

Permalink
[Merge] #71 브랜치 병합
Browse files Browse the repository at this point in the history
  • Loading branch information
i-colours-u committed Jul 16, 2022
2 parents 8fe600f + 4a7d785 commit d3f0f67
Show file tree
Hide file tree
Showing 6 changed files with 296 additions and 3 deletions.
37 changes: 36 additions & 1 deletion HealthFoodMe/HealthFoodMe.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@
FD39FAD02880C32B00A01CDA /* NicknameChangeViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDF2E203287F27860007D4F9 /* NicknameChangeViewModel.swift */; };
FD39FAD12880C35000A01CDA /* UpperToastView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDF2E20A287F3C360007D4F9 /* UpperToastView.swift */; };
FD58291A287DC39A00CE62E8 /* mapContainerViewTouchDelegateProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD582917287DC39A00CE62E8 /* mapContainerViewTouchDelegateProxy.swift */; };
FD39FAD62880C63E00A01CDA /* Setting.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FD39FAD52880C63E00A01CDA /* Setting.storyboard */; };
FD39FAD82880C69400A01CDA /* SettingVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD39FAD72880C69400A01CDA /* SettingVC.swift */; };
FD58291A287DC39A00CE62E8 /* mapContainerViewDelegateProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD582917287DC39A00CE62E8 /* mapContainerViewDelegateProxy.swift */; };
FD58291B287DC39A00CE62E8 /* mapContainerView + Reactive.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD582918287DC39A00CE62E8 /* mapContainerView + Reactive.swift */; };
FD58291C287DC39A00CE62E8 /* mapContainerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD582919287DC39A00CE62E8 /* mapContainerView.swift */; };
FD59028D288338D700D59D57 /* ReviewWriteNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD59028C288338D700D59D57 /* ReviewWriteNavigationController.swift */; };
Expand Down Expand Up @@ -359,6 +362,10 @@
EBF66B072872AF5B00DE0ED1 /* SampleEntity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SampleEntity.swift; sourceTree = "<group>"; };
EBF66B092872B21F00DE0ED1 /* StringLiterals.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringLiterals.swift; sourceTree = "<group>"; };
EBF66B0B2872B4FE00DE0ED1 /* StoryboardLiterals.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoryboardLiterals.swift; sourceTree = "<group>"; };
F3FFC8B608A27EA9662A18AB /* Pods-HealthFoodMe.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HealthFoodMe.release.xcconfig"; path = "Target Support Files/Pods-HealthFoodMe/Pods-HealthFoodMe.release.xcconfig"; sourceTree = "<group>"; };
FD39FAD52880C63E00A01CDA /* Setting.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Setting.storyboard; sourceTree = "<group>"; };
FD39FAD72880C69400A01CDA /* SettingVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingVC.swift; sourceTree = "<group>"; };
FD582917287DC39A00CE62E8 /* mapContainerViewDelegateProxy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = mapContainerViewDelegateProxy.swift; sourceTree = "<group>"; };
FD582917287DC39A00CE62E8 /* mapContainerViewTouchDelegateProxy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = mapContainerViewTouchDelegateProxy.swift; sourceTree = "<group>"; };
FD582918287DC39A00CE62E8 /* mapContainerView + Reactive.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "mapContainerView + Reactive.swift"; sourceTree = "<group>"; };
FD582919287DC39A00CE62E8 /* mapContainerView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = mapContainerView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1354,6 +1361,7 @@
isa = PBXGroup;
children = (
695758E628830C3100E36789 /* Splash */,
FD39FAD22880C62600A01CDA /* Setting */,
A93252AE287F2AD7001EDF50 /* Scrap */,
A9325272287D24CD001EDF50 /* Search */,
3BCC441A28745FA900661A12 /* Auth */,
Expand Down Expand Up @@ -1454,7 +1462,32 @@
path = Views;
sourceTree = "<group>";
};
FDA3AEEC288060E800D6CCB4 /* UserWithdrawlScene */ = {
FD39FAD22880C62600A01CDA /* Setting */ = {
isa = PBXGroup;
children = (
FD39FAD42880C63100A01CDA /* VC */,
FD39FAD32880C62E00A01CDA /* Views */,
);
path = Setting;
sourceTree = "<group>";
};
FD39FAD32880C62E00A01CDA /* Views */ = {
isa = PBXGroup;
children = (
FD39FAD52880C63E00A01CDA /* Setting.storyboard */,
);
path = Views;
sourceTree = "<group>";
};
FD39FAD42880C63100A01CDA /* VC */ = {
isa = PBXGroup;
children = (
FD39FAD72880C69400A01CDA /* SettingVC.swift */,
);
path = VC;
sourceTree = "<group>";
};
FD924374288007E00034876B /* Views */ = {
isa = PBXGroup;
children = (
FDA3AEEF2880610200D6CCB4 /* Views */,
Expand Down Expand Up @@ -1644,6 +1677,7 @@
695758B9287D7C0B00E36789 /* MenuTab.storyboard in Resources */,
3B0B25542876BBE400950539 /* NotoSansCJKkr-Regular.otf in Resources */,
3B089C4B287D877F00DA80B9 /* GodoB.otf in Resources */,
FD39FAD62880C63E00A01CDA /* Setting.storyboard in Resources */,
A938BB90287D222800B8DE07 /* MainDetail.storyboard in Resources */,
695758BD287DA4CD00E36789 /* ReviewWrite.storyboard in Resources */,
A93252E22880CBB9001EDF50 /* HelfmeAlert.storyboard in Resources */,
Expand Down Expand Up @@ -1793,6 +1827,7 @@
EBF66ABD287227F500DE0ED1 /* UIDevice+.swift in Sources */,
3BC01F7B287E89D2006C2181 /* ReviewCVC.swift in Sources */,
EBF66AE1287227F500DE0ED1 /* BaseService.swift in Sources */,
FD39FAD82880C69400A01CDA /* SettingVC.swift in Sources */,
EBF66AE2287227F500DE0ED1 /* BaseRouter.swift in Sources */,
3B723C912880037100822B7C /* ReviewPhotoCVC.swift in Sources */,
EBF66AE3287227F500DE0ED1 /* NetworkResult.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ enum Storyboards: String {
case hamburgerBar = "HamburgerBar"
case reviewDetail = "ReviewDetail"
case nicknameChange = "NicknameChange"
case setting = "Setting"
case userWithdrawal = "UserWithdrawal"
case copingTab = "CopingTab"
case reviewEmptyView = "ReviewEmptyView"
Expand Down
10 changes: 10 additions & 0 deletions HealthFoodMe/HealthFoodMe/Global/Literals/StringLiterals.swift
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,16 @@ struct I18N {
static let dietStore = "다이어터도 즐길 수 있는 식당"
static let goScrap = "스크랩하러 가기"
}

struct Setting {
static let customerServiceTitle = "고객지원"
static let askButtonTitle = "문의하기"
static let userWithdrawalTitle = "회원탈퇴"
static let termsTitle = "약관 및 정책"
static let openSourceButtonTitle = "오픈 소스 정보"
static let naverMapTerms = "네이버 지도 법적 공지"
static let naverMapLicense = "네이버 지도 오픈 소스 라이선스"
}

struct Coping {
static let recommendHeader = "추천하는 이유!"
Expand Down
212 changes: 212 additions & 0 deletions HealthFoodMe/HealthFoodMe/Presentation/Setting/VC/SettingVC.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
//
// SettingVC.swift
// HealthFoodMe
//
// Created by 송지훈 on 2022/07/15.
//

import UIKit

class SettingVC: UIViewController {

// MARK: - Properties

// MARK: - UI Components

private var topTitleLabel: UILabel = {
let label = UILabel()
label.font = .NotoBold(size: 16)
label.text = I18N.Auth.ChangeNickname.headerTitle
label.textColor = UIColor.helfmeBlack
return label
}()

private lazy var backButton: UIButton = {
let button = UIButton()
button.setBackgroundImage(ImageLiterals.MainDetail.beforeIcon, for: .normal)
button.press { self.navigationController?.popViewController(animated: true) }
return button
}()

private lazy var headerDividerView: UIView = {
let dividerView = UIView()
dividerView.backgroundColor = UIColor.helfmeLineGray
return dividerView
}()

private lazy var customerServiceTitle: UILabel = {
let label = UILabel()
label.text = I18N.Setting.customerServiceTitle
label.font = .NotoRegular(size: 14)
label.textColor = UIColor.helfmeGray2
return label
}()

private lazy var askButton: UIButton = {
let button = UIButton()
button.setTitle(I18N.Setting.askButtonTitle, for: .normal)
button.setTitleColor(UIColor.helfmeBlack, for: .normal)
button.titleLabel?.font = .NotoRegular(size: 16)
button.contentHorizontalAlignment = .left
return button
}()

private lazy var withdrawalButton: UIButton = {
let button = UIButton()
button.setTitle(I18N.Setting.userWithdrawalTitle, for: .normal)
button.setTitleColor(UIColor.helfmeBlack, for: .normal)
button.titleLabel?.font = .NotoRegular(size: 16)
button.contentHorizontalAlignment = .left
return button
}()

private lazy var termsTitle: UILabel = {
let label = UILabel()
label.text = I18N.Setting.termsTitle
label.font = .NotoRegular(size: 14)
label.textColor = UIColor.helfmeGray2
return label
}()

private lazy var openSourceButton: UIButton = {
let button = UIButton()
button.setTitle(I18N.Setting.openSourceButtonTitle, for: .normal)
button.setTitleColor(UIColor.helfmeBlack, for: .normal)
button.titleLabel?.font = .NotoRegular(size: 16)
button.contentHorizontalAlignment = .left
return button
}()

private lazy var naverMapTermsButton: UIButton = {
let button = UIButton()
button.setTitle(I18N.Setting.naverMapTerms, for: .normal)
button.setTitleColor(UIColor.helfmeBlack, for: .normal)
button.titleLabel?.font = .NotoRegular(size: 16)
button.contentHorizontalAlignment = .left
return button
}()

private lazy var naverMapLicenseButton: UIButton = {
let button = UIButton()
button.setTitle(I18N.Setting.naverMapLicense, for: .normal)
button.setTitleColor(UIColor.helfmeBlack, for: .normal)
button.titleLabel?.font = .NotoRegular(size: 16)
button.contentHorizontalAlignment = .left
return button
}()


// MARK: - View Life Cycle

override func viewDidLoad() {
super.viewDidLoad()
setUI()
setLayout()
addButtonAction()
}
}

// MARK: - Methods

extension SettingVC {
private func setLayout() {
view.addSubviews(topTitleLabel, backButton, headerDividerView,
customerServiceTitle, askButton, withdrawalButton,
termsTitle, openSourceButton, naverMapTermsButton, naverMapLicenseButton)

topTitleLabel.snp.makeConstraints { make in
make.top.equalTo(view.safeAreaLayoutGuide).offset(14)
make.centerX.equalToSuperview()
make.height.equalTo(20)
}

backButton.snp.makeConstraints { make in
make.height.width.equalTo(24)
make.top.equalTo(view.safeAreaLayoutGuide).offset(12)
make.leading.equalToSuperview().offset(20)
}

headerDividerView.snp.makeConstraints { make in
make.top.equalTo(topTitleLabel.snp.bottom).offset(13)
make.leading.trailing.equalToSuperview()
make.height.equalTo(1)
}

customerServiceTitle.snp.makeConstraints { make in
make.top.equalTo(headerDividerView.snp.bottom).offset(32)
make.leading.equalToSuperview().offset(20)
make.height.equalTo(20)
}

askButton.snp.makeConstraints { make in
make.top.equalTo(customerServiceTitle.snp.bottom).offset(24)
make.leading.equalToSuperview().offset(20)
make.trailing.equalToSuperview().offset(-20)
make.height.equalTo(16)
}

withdrawalButton.snp.makeConstraints { make in
make.top.equalTo(askButton.snp.bottom).offset(36)
make.leading.equalToSuperview().offset(20)
make.trailing.equalToSuperview().offset(-20)
make.height.equalTo(16)
}

termsTitle.snp.makeConstraints { make in
make.top.equalTo(withdrawalButton.snp.bottom).offset(54)
make.leading.equalToSuperview().offset(20)
make.height.equalTo(20)
}

openSourceButton.snp.makeConstraints { make in
make.top.equalTo(termsTitle.snp.bottom).offset(24)
make.leading.equalToSuperview().offset(20)
make.trailing.equalToSuperview().offset(-20)
make.height.equalTo(16)
}

naverMapTermsButton.snp.makeConstraints { make in
make.top.equalTo(openSourceButton.snp.bottom).offset(36)
make.leading.equalToSuperview().offset(20)
make.trailing.equalToSuperview().offset(-20)
make.height.equalTo(16)
}

naverMapLicenseButton.snp.makeConstraints { make in
make.top.equalTo(naverMapTermsButton.snp.bottom).offset(36)
make.leading.equalToSuperview().offset(20)
make.trailing.equalToSuperview().offset(-20)
make.height.equalTo(16)
}
}

private func setUI() {
self.navigationController?.navigationBar.isHidden = true
}
}

// MARK: - Methods

extension SettingVC {
private func addButtonAction() {
askButton.press(animated: false) {
print("문의하기")
}

withdrawalButton.press(animated: false) {
print("회원탈퇴")
}

openSourceButton.press(animated: false) {
print("오픈 소스 정보")
}

naverMapTermsButton.press(animated: false) {
print("네이버 지도 법적 공지")
}

naverMapLicenseButton.press(animated: false) {
print("네이버 지도 라이선스")
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--SettingVC-->
<scene sceneID="s0d-6b-0kx">
<objects>
<viewController storyboardIdentifier="SettingVC" id="Y6W-OH-hqX" customClass="SettingVC" customModule="HealthFoodMe" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="5EZ-qb-Rvc">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<viewLayoutGuide key="safeArea" id="vDu-zF-Fre"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Ief-a0-LHa" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-16" y="85"/>
</scene>
</scenes>
<resources>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
6 changes: 4 additions & 2 deletions HealthFoodMe/HealthFoodMe/Utils/buttonPress.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ extension UIButton {
iOS13까지는 NSObject형태로 등록해서 처리하는 방식으로 분기처리합니다.
*/

func press(vibrate: Bool = false, for controlEvents: UIControl.Event = .touchUpInside, _ closure: @escaping() -> Void) {
func press(vibrate: Bool = false,
animated: Bool = true,
for controlEvents: UIControl.Event = .touchUpInside, _ closure: @escaping() -> Void) {
if #available(iOS 14.0, *) {
self.addAction(UIAction { _ in closure()
self.clickedAnimation(vibrate: vibrate)
if animated { self.clickedAnimation(vibrate: vibrate) }
}, for: controlEvents)
} else {
@objc class ClosureSleeve: NSObject {
Expand Down

0 comments on commit d3f0f67

Please sign in to comment.