-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[Feat] #63 - 설정뷰 서비스 이용 방침 추가
- Loading branch information
Showing
6 changed files
with
449 additions
and
2 deletions.
There are no files selected for viewing
267 changes: 267 additions & 0 deletions
267
SOPT-Stamp-iOS/Projects/Core/Sources/Literals/StringLiterals.swift
Large diffs are not rendered by default.
Oops, something went wrong.
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
79 changes: 79 additions & 0 deletions
79
SOPT-Stamp-iOS/Projects/Presentation/Sources/SettingScene/VC/PrivacyPolicyVC.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,79 @@ | ||
// | ||
// PrivacyPolicyVC.swift | ||
// Presentation | ||
// | ||
// Created by devxsby on 2022/12/29. | ||
// Copyright © 2022 SOPT-Stamp-iOS. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
import DSKit | ||
|
||
import Core | ||
|
||
import SnapKit | ||
import Then | ||
|
||
public class PrivacyPolicyVC: UIViewController { | ||
|
||
// MARK: - UI Components | ||
|
||
private lazy var naviBar = CustomNavigationBar(self, type: .titleWithLeftButton) | ||
.setTitle(I18N.Setting.personalInfoPolicy) | ||
.setRightButton(.none) | ||
|
||
private let textView = UITextView().then { | ||
$0.text = I18N.serviceUsagePolicy.privacyPolicy | ||
$0.isEditable = false | ||
$0.showsVerticalScrollIndicator = false | ||
$0.setLineSpacing(lineSpacing: 5) | ||
} | ||
|
||
// MARK: - View Life Cycle | ||
|
||
public override func viewDidLoad() { | ||
super.viewDidLoad() | ||
self.setUI() | ||
self.setLayout() | ||
self.setDelegate() | ||
} | ||
} | ||
|
||
// MARK: - UI & Layout | ||
|
||
extension PrivacyPolicyVC { | ||
|
||
private func setUI() { | ||
self.view.backgroundColor = DSKitAsset.Colors.white.color | ||
} | ||
|
||
private func setLayout() { | ||
self.view.addSubviews(naviBar, textView) | ||
|
||
naviBar.snp.makeConstraints { make in | ||
make.leading.top.trailing.equalTo(view.safeAreaLayoutGuide) | ||
} | ||
|
||
textView.snp.makeConstraints { make in | ||
make.top.equalTo(naviBar.snp.bottom).offset(8) | ||
make.leading.trailing.equalTo(view.safeAreaInsets).inset(20) | ||
make.bottom.equalToSuperview() | ||
} | ||
} | ||
} | ||
|
||
// MARK: - Methods | ||
|
||
extension PrivacyPolicyVC { | ||
|
||
private func setDelegate() { | ||
textView.delegate = self | ||
} | ||
} | ||
|
||
extension PrivacyPolicyVC: UITextViewDelegate { | ||
|
||
public func textViewDidChangeSelection(_ textView: UITextView) { | ||
textView.selectedTextRange = nil | ||
} | ||
} |
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
79 changes: 79 additions & 0 deletions
79
SOPT-Stamp-iOS/Projects/Presentation/Sources/SettingScene/VC/TermsOfServiceVC.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,79 @@ | ||
// | ||
// TermsOfServiceVC.swift | ||
// Presentation | ||
// | ||
// Created by devxsby on 2022/12/29. | ||
// Copyright © 2022 SOPT-Stamp-iOS. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
import DSKit | ||
|
||
import Core | ||
|
||
import SnapKit | ||
import Then | ||
|
||
public class TermsOfServiceVC: UIViewController { | ||
|
||
// MARK: - UI Components | ||
|
||
private lazy var naviBar = CustomNavigationBar(self, type: .titleWithLeftButton) | ||
.setTitle(I18N.Setting.serviceTerm) | ||
.setRightButton(.none) | ||
|
||
private let textView = UITextView().then { | ||
$0.text = I18N.serviceUsagePolicy.termsOfService | ||
$0.isEditable = false | ||
$0.showsVerticalScrollIndicator = false | ||
$0.setLineSpacing(lineSpacing: 5) | ||
} | ||
|
||
// MARK: - View Life Cycle | ||
|
||
public override func viewDidLoad() { | ||
super.viewDidLoad() | ||
self.setUI() | ||
self.setLayout() | ||
self.setDelegate() | ||
} | ||
} | ||
|
||
// MARK: - UI & Layout | ||
|
||
extension TermsOfServiceVC { | ||
|
||
private func setUI() { | ||
self.view.backgroundColor = DSKitAsset.Colors.white.color | ||
} | ||
|
||
private func setLayout() { | ||
self.view.addSubviews(naviBar, textView) | ||
|
||
naviBar.snp.makeConstraints { make in | ||
make.leading.top.trailing.equalTo(view.safeAreaLayoutGuide) | ||
} | ||
|
||
textView.snp.makeConstraints { make in | ||
make.top.equalTo(naviBar.snp.bottom).offset(8) | ||
make.leading.trailing.equalTo(view.safeAreaInsets).inset(20) | ||
make.bottom.equalToSuperview() | ||
} | ||
} | ||
} | ||
|
||
// MARK: - Methods | ||
|
||
extension TermsOfServiceVC { | ||
|
||
private func setDelegate() { | ||
textView.delegate = self | ||
} | ||
} | ||
|
||
extension TermsOfServiceVC: UITextViewDelegate { | ||
|
||
public func textViewDidChangeSelection(_ textView: UITextView) { | ||
textView.selectedTextRange = nil | ||
} | ||
} |
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