Skip to content
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

1.0.4 업데이트 구현 머지 #3

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions idorm.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1494,7 +1494,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.3;
MARKETING_VERSION = 1.0.4;
PRODUCT_BUNDLE_IDENTIFIER = eungcheol.idorm;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
Expand Down Expand Up @@ -1531,7 +1531,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.3;
MARKETING_VERSION = 1.0.4;
PRODUCT_BUNDLE_IDENTIFIER = eungcheol.idorm;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
filePath = "idorm/Source/Presentation/MyPage/ViewControllers/MyRoommateVC.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "205"
endingLineNumber = "205"
startingLineNumber = "204"
endingLineNumber = "204"
landmarkName = "tableView(_:viewForHeaderInSection:)"
landmarkType = "7">
</BreakpointContent>
Expand All @@ -30,8 +30,8 @@
filePath = "idorm/Source/Presentation/MyPage/ViewControllers/MyRoommateVC.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "206"
endingLineNumber = "206"
startingLineNumber = "205"
endingLineNumber = "205"
landmarkName = "tableView(_:viewForHeaderInSection:)"
landmarkType = "7">
</BreakpointContent>
Expand Down
4 changes: 1 addition & 3 deletions idorm/Configuration/Base/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
}

func sceneDidBecomeActive(_ scene: UIScene) {

// PasteBoard
let pasteBoard = UIPasteboard.general

Expand All @@ -58,7 +58,5 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
guard let newString = string.checkForUrls.first?.absoluteString else { return }

pasteBoard.string = newString
print(#function)
print(newString)
}
}
2 changes: 1 addition & 1 deletion idorm/Configuration/Extensions/String+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ extension String {
}

static var version: String {
return "\(Bundle.main.infoDictionary?["CFBundleShortVersionString"] as! String).\(Bundle.main.infoDictionary?["CFBundleVersion"] as! String)"
return "\(Bundle.main.infoDictionary?["CFBundleShortVersionString"] as! String)"
}

var isValidNickname: Bool {
Expand Down
11 changes: 7 additions & 4 deletions idorm/Configuration/Storages/UserStorage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,31 @@ import Foundation

final class UserStorage {

static let userDefaults = UserDefaults.standard

private enum Keys: String {
case email = "EMAIL"
case password = "PASSWORD"
}

static func saveEmail(from email: String) {
let userDefaults = UserDefaults.standard
userDefaults.set(email, forKey: Keys.email.rawValue)
}

static func savePassword(from password: String) {
let userDefaults = UserDefaults.standard
userDefaults.set(password, forKey: Keys.password.rawValue)
}

static func loadEmail() -> String {
let userDefaults = UserDefaults.standard
return userDefaults.string(forKey: Keys.email.rawValue) ?? ""
}

static func loadPassword() -> String {
let userDefaults = UserDefaults.standard
return userDefaults.string(forKey: Keys.password.rawValue) ?? ""
}

static func reset() {
userDefaults.removeObject(forKey: Keys.email.rawValue)
userDefaults.removeObject(forKey: Keys.password.rawValue)
}
}
2 changes: 1 addition & 1 deletion idorm/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
</dict>
</dict>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ final class LoginViewController: BaseViewController, View {
TokenStorage.removeToken()
MemberStorage.shared.resetMember()
FilterStorage.shared.resetFilter()
UserStorage.reset()
}

// MARK: - Bind
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ final class MatchingFilterViewController: BaseViewController, View {
updateFilteredUI(FilterStorage.shared.filter)
}
}

// MARK: - Bind

func bind(reactor: MatchingFilterViewReactor) {
Expand Down Expand Up @@ -171,7 +171,7 @@ final class MatchingFilterViewController: BaseViewController, View {
override func setupStyles() {
super.setupStyles()

navigationController?.isNavigationBarHidden = false
navigationController?.setNavigationBarHidden(false, animated: true)
contentView.backgroundColor = .white
view.backgroundColor = .white
navigationItem.title = "필터"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,12 @@ final class MatchingViewController: BaseViewController, View {
}

private lazy var buttonStack = UIStackView().then { stack in
[cancelButton, backButton, messageButton, heartButton]
.forEach { stack.addArrangedSubview($0) }
[
cancelButton,
backButton,
messageButton,
heartButton
].forEach { stack.addArrangedSubview($0) }
stack.spacing = 4
}

Expand All @@ -65,6 +69,7 @@ final class MatchingViewController: BaseViewController, View {
$0.addSubview(buttonStack)
}

override var preferredStatusBarStyle: UIStatusBarStyle { .lightContent }
private let informationImageView = UIImageView()
private let cancelButton = MatchingUtilities.matchingButton(imageName: "circle_dislike_red")
private let messageButton = MatchingUtilities.matchingButton(imageName: "circle_speechBubble_yellow")
Expand All @@ -75,8 +80,7 @@ final class MatchingViewController: BaseViewController, View {

override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
navigationController?.isNavigationBarHidden = true
tabBarController?.tabBar.isHidden = false
navigationController?.setNavigationBarHidden(true, animated: true)
}

// MARK: - Setup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,12 @@ final class ManageMyInfoViewController: BaseViewController, View {
// MARK: - Setup

override func setupStyles() {
super.setupStyles()

navigationController?.setNavigationBarHidden(false, animated: true)
navigationItem.title = "내 정보 관리"
view.backgroundColor = .white
}

override func setupLayouts() {
super.setupLayouts()

view.addSubview(scrollView)
scrollView.addSubview(contentView)

Expand All @@ -174,8 +171,7 @@ final class ManageMyInfoViewController: BaseViewController, View {
separatorLine2,
withDrawLabel,
logoutButton
]
.forEach { contentView.addSubview($0) }
].forEach { contentView.addSubview($0) }
}

override func setupConstraints() {
Expand Down
35 changes: 11 additions & 24 deletions idorm/Source/Presentation/MyPage/ViewControllers/MyPageVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,33 +25,26 @@ final class MyPageViewController: BaseViewController, View {
}

private let scrollView = UIScrollView().then {
$0.contentInsetAdjustmentBehavior = .never
$0.bounces = false
}

private let contentView = UIView().then {
$0.backgroundColor = .idorm_gray_100
}

private let gearButton = UIButton().then {
$0.setImage(#imageLiteral(resourceName: "gear"), for: .normal)
}

private let lionImageView = UIImageView(image: #imageLiteral(resourceName: "lion_half"))
private let topProfileView = TopProfileView()
private let matchingContainerView = MatchingContainerView()
override var preferredStatusBarStyle: UIStatusBarStyle { .lightContent }

// MARK: - LifeCycle

override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
navigationController?.navigationBar.isHidden = false
navigationController?.setNavigationBarHidden(true, animated: true)
tabBarController?.tabBar.isHidden = false

let navigationBarAppearance = AppearanceManager.navigationAppearance(from: .idorm_blue, shadow: false)
navigationController?.navigationBar.standardAppearance = navigationBarAppearance
navigationController?.navigationBar.scrollEdgeAppearance = navigationBarAppearance
navigationController?.navigationBar.compactAppearance = navigationBarAppearance

let tabBarAppearance = AppearanceManager.tabbarAppearance(from: .idorm_gray_100)
tabBarController?.tabBar.standardAppearance = tabBarAppearance
tabBarController?.tabBar.scrollEdgeAppearance = tabBarAppearance
Expand All @@ -60,11 +53,6 @@ final class MyPageViewController: BaseViewController, View {
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)

let navigationBarAppearance = AppearanceManager.navigationAppearance(from: .white, shadow: false)
navigationController?.navigationBar.standardAppearance = navigationBarAppearance
navigationController?.navigationBar.scrollEdgeAppearance = navigationBarAppearance
navigationController?.navigationBar.compactAppearance = navigationBarAppearance

let tabBarAppearance = AppearanceManager.tabbarAppearance(from: .white)
tabBarController?.tabBar.standardAppearance = tabBarAppearance
tabBarController?.tabBar.scrollEdgeAppearance = tabBarAppearance
Expand All @@ -83,7 +71,7 @@ final class MyPageViewController: BaseViewController, View {
.disposed(by: disposeBag)

// 설정 버튼 클릭
gearButton.rx.tap
topProfileView.gearBtn.rx.tap
.map { MyPageViewReactor.Action.didTapGearButton }
.bind(to: reactor.action)
.disposed(by: disposeBag)
Expand Down Expand Up @@ -245,20 +233,19 @@ final class MyPageViewController: BaseViewController, View {
// MARK: - Setup

override func setupStyles() {
super.setupStyles()
view.backgroundColor = .white
navigationItem.rightBarButtonItem = UIBarButtonItem(customView: gearButton)
view.backgroundColor = .idorm_blue
}

override func setupLayouts() {
super.setupLayouts()

view.addSubview(scrollView)
view.addSubview(indicator)
scrollView.addSubview(contentView)

[topProfileView, matchingContainerView, lionImageView]
.forEach { contentView.addSubview($0) }
[
topProfileView,
matchingContainerView,
lionImageView
].forEach { contentView.addSubview($0) }
}

override func setupConstraints() {
Expand All @@ -280,7 +267,7 @@ final class MyPageViewController: BaseViewController, View {

topProfileView.snp.makeConstraints { make in
make.leading.trailing.top.equalToSuperview()
make.height.equalTo(146)
make.height.equalTo(190)
}

matchingContainerView.snp.makeConstraints { make in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ final class MyRoommateViewController: BaseViewController, View {
.withUnretained(self)
.bind { $0.0.tableView.reloadData() }
.disposed(by: disposeBag)

// 현재 정렬
reactor.state
.map { $0.currentSort }
Expand Down Expand Up @@ -137,8 +137,7 @@ final class MyRoommateViewController: BaseViewController, View {
// MARK: - Setup

override func setupStyles() {
super.setupStyles()

navigationController?.setNavigationBarHidden(false, animated: true)
view.backgroundColor = .idorm_gray_100
switch roommate {
case .like:
Expand Down
34 changes: 26 additions & 8 deletions idorm/Source/Presentation/MyPage/Views/TopProfileView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,20 @@ final class TopProfileView: UIView {

// MARK: - Properties

let nicknameLabel = UILabel().then {
$0.textColor = .idorm_gray_100
$0.font = .init(name: MyFonts.medium.rawValue, size: 14)
}
let gearBtn: UIButton = {
let btn = UIButton()
btn.setImage(UIImage(named: "gear"), for: .normal)

return btn
}()

let nicknameLabel: UILabel = {
let lb = UILabel()
lb.textColor = .idorm_gray_100
lb.font = .init(name: MyFonts.medium.rawValue, size: 14)

return lb
}()

let profileImageView = UIImageView(image: #imageLiteral(resourceName: "sqaure_human"))

Expand Down Expand Up @@ -39,19 +49,27 @@ final class TopProfileView: UIView {
}

private func setupLayout() {
[profileImageView, nicknameLabel]
.forEach { addSubview($0) }
[
profileImageView,
nicknameLabel,
gearBtn
].forEach { addSubview($0) }
}

private func setupConstraints() {
profileImageView.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.top.equalToSuperview().inset(16)
make.bottom.equalTo(nicknameLabel.snp.top).offset(-8)
}

nicknameLabel.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.top.equalTo(profileImageView.snp.bottom).offset(8)
make.bottom.equalToSuperview().inset(24)
}

gearBtn.snp.makeConstraints { make in
make.top.equalToSuperview().inset(16)
make.trailing.equalToSuperview().inset(24)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ final class OnboardingDetailViewController: BaseViewController, View {
super.setupStyles()
view.backgroundColor = .white
navigationItem.title = "내 프로필 이미지"
navigationController?.setNavigationBarHidden(false, animated: true)
}

override func setupLayouts() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ final class OnboardingViewController: BaseViewController, View {
}

override func setupStyles() {
super.setupStyles()
navigationController?.setNavigationBarHidden(false, animated: true)
contentView.backgroundColor = .white
view.backgroundColor = .white

Expand Down