diff --git a/assignment/assignment.xcodeproj/project.pbxproj b/assignment/assignment.xcodeproj/project.pbxproj index 24630a9..55692f1 100644 --- a/assignment/assignment.xcodeproj/project.pbxproj +++ b/assignment/assignment.xcodeproj/project.pbxproj @@ -23,6 +23,19 @@ 986168C72805B29600A8859F /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 986168C62805B29600A8859F /* ViewController.swift */; }; 98967EF927FD5EB60031138C /* JoinNameViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98967EF827FD5EB60031138C /* JoinNameViewController.swift */; }; 98967EFB27FD5ECE0031138C /* JoinPasswordViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98967EFA27FD5ECE0031138C /* JoinPasswordViewController.swift */; }; + 98A0CD8428097694009609C1 /* UILabel+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98A0CD8328097694009609C1 /* UILabel+.swift */; }; + 98BE769C2809D37C0067D688 /* UIViewController+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98BE769B2809D37C0067D688 /* UIViewController+.swift */; }; + 98FAA817280934B5000749D2 /* Home.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 98FAA816280934B5000749D2 /* Home.storyboard */; }; + 98FAA819280934C2000749D2 /* Search.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 98FAA818280934C2000749D2 /* Search.storyboard */; }; + 98FAA81B2809351D000749D2 /* Reels.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 98FAA81A2809351D000749D2 /* Reels.storyboard */; }; + 98FAA81D28093528000749D2 /* Shop.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 98FAA81C28093528000749D2 /* Shop.storyboard */; }; + 98FAA81F28093531000749D2 /* MyPage.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 98FAA81E28093531000749D2 /* MyPage.storyboard */; }; + 98FAA821280935F0000749D2 /* MainTabbarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98FAA820280935F0000749D2 /* MainTabbarController.swift */; }; + 98FAA82328093696000749D2 /* HomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98FAA82228093696000749D2 /* HomeViewController.swift */; }; + 98FAA825280936B0000749D2 /* SearchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98FAA824280936B0000749D2 /* SearchViewController.swift */; }; + 98FAA827280936BF000749D2 /* ReelsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98FAA826280936BF000749D2 /* ReelsViewController.swift */; }; + 98FAA829280936CC000749D2 /* ShopViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98FAA828280936CC000749D2 /* ShopViewController.swift */; }; + 98FAA82B280936E5000749D2 /* MyPageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98FAA82A280936E5000749D2 /* MyPageViewController.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -44,6 +57,19 @@ 986168C62805B29600A8859F /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 98967EF827FD5EB60031138C /* JoinNameViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JoinNameViewController.swift; sourceTree = ""; }; 98967EFA27FD5ECE0031138C /* JoinPasswordViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JoinPasswordViewController.swift; sourceTree = ""; }; + 98A0CD8328097694009609C1 /* UILabel+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UILabel+.swift"; sourceTree = ""; }; + 98BE769B2809D37C0067D688 /* UIViewController+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIViewController+.swift"; sourceTree = ""; }; + 98FAA816280934B5000749D2 /* Home.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Home.storyboard; sourceTree = ""; }; + 98FAA818280934C2000749D2 /* Search.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Search.storyboard; sourceTree = ""; }; + 98FAA81A2809351D000749D2 /* Reels.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Reels.storyboard; sourceTree = ""; }; + 98FAA81C28093528000749D2 /* Shop.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Shop.storyboard; sourceTree = ""; }; + 98FAA81E28093531000749D2 /* MyPage.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = MyPage.storyboard; sourceTree = ""; }; + 98FAA820280935F0000749D2 /* MainTabbarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainTabbarController.swift; sourceTree = ""; }; + 98FAA82228093696000749D2 /* HomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeViewController.swift; sourceTree = ""; }; + 98FAA824280936B0000749D2 /* SearchViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchViewController.swift; sourceTree = ""; }; + 98FAA826280936BF000749D2 /* ReelsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReelsViewController.swift; sourceTree = ""; }; + 98FAA828280936CC000749D2 /* ShopViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShopViewController.swift; sourceTree = ""; }; + 98FAA82A280936E5000749D2 /* MyPageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyPageViewController.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -73,7 +99,13 @@ 980D11D127FD56700009F772 /* Login */, 980D11D627FD56890009F772 /* Join */, 980D11DB27FD57C90009F772 /* Complete */, + 98FAA8112809347B000749D2 /* Home */, + 98FAA8122809347F000749D2 /* Search */, + 98FAA81328093483000749D2 /* Reels */, + 98FAA81428093489000749D2 /* Shop */, + 98FAA8152809348D000749D2 /* MyPage */, 985946AA27FA7E5C00F7610D /* Main.storyboard */, + 98FAA820280935F0000749D2 /* MainTabbarController.swift */, ); path = Scene; sourceTree = ""; @@ -138,6 +170,7 @@ 980D11CA27FD55130009F772 /* Supports */, 986168BF2805B26800A8859F /* Resources */, 986168BE2805B25500A8859F /* Const */, + 98A0CD8228097455009609C1 /* AppExtension */, ); path = Configuration; sourceTree = ""; @@ -161,6 +194,60 @@ path = Resources; sourceTree = ""; }; + 98A0CD8228097455009609C1 /* AppExtension */ = { + isa = PBXGroup; + children = ( + 98A0CD8328097694009609C1 /* UILabel+.swift */, + 98BE769B2809D37C0067D688 /* UIViewController+.swift */, + ); + path = AppExtension; + sourceTree = ""; + }; + 98FAA8112809347B000749D2 /* Home */ = { + isa = PBXGroup; + children = ( + 98FAA816280934B5000749D2 /* Home.storyboard */, + 98FAA82228093696000749D2 /* HomeViewController.swift */, + ); + path = Home; + sourceTree = ""; + }; + 98FAA8122809347F000749D2 /* Search */ = { + isa = PBXGroup; + children = ( + 98FAA818280934C2000749D2 /* Search.storyboard */, + 98FAA824280936B0000749D2 /* SearchViewController.swift */, + ); + path = Search; + sourceTree = ""; + }; + 98FAA81328093483000749D2 /* Reels */ = { + isa = PBXGroup; + children = ( + 98FAA81A2809351D000749D2 /* Reels.storyboard */, + 98FAA826280936BF000749D2 /* ReelsViewController.swift */, + ); + path = Reels; + sourceTree = ""; + }; + 98FAA81428093489000749D2 /* Shop */ = { + isa = PBXGroup; + children = ( + 98FAA81C28093528000749D2 /* Shop.storyboard */, + 98FAA828280936CC000749D2 /* ShopViewController.swift */, + ); + path = Shop; + sourceTree = ""; + }; + 98FAA8152809348D000749D2 /* MyPage */ = { + isa = PBXGroup; + children = ( + 98FAA81E28093531000749D2 /* MyPage.storyboard */, + 98FAA82A280936E5000749D2 /* MyPageViewController.swift */, + ); + path = MyPage; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -219,11 +306,16 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 98FAA81D28093528000749D2 /* Shop.storyboard in Resources */, + 98FAA817280934B5000749D2 /* Home.storyboard in Resources */, 980D11D327FD56770009F772 /* Login.storyboard in Resources */, 980D11DD27FD57D30009F772 /* Complete.storyboard in Resources */, 985946B127FA7E5C00F7610D /* LaunchScreen.storyboard in Resources */, 985946AE27FA7E5C00F7610D /* Assets.xcassets in Resources */, + 98FAA81F28093531000749D2 /* MyPage.storyboard in Resources */, 985946AC27FA7E5C00F7610D /* Main.storyboard in Resources */, + 98FAA819280934C2000749D2 /* Search.storyboard in Resources */, + 98FAA81B2809351D000749D2 /* Reels.storyboard in Resources */, 980D11D827FD56910009F772 /* Join.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -237,14 +329,22 @@ files = ( 980D11D527FD567D0009F772 /* LoginViewController.swift in Sources */, 986168C32805B28A00A8859F /* Image.swift in Sources */, + 98FAA829280936CC000749D2 /* ShopViewController.swift in Sources */, 98967EFB27FD5ECE0031138C /* JoinPasswordViewController.swift in Sources */, 986168C72805B29600A8859F /* ViewController.swift in Sources */, + 98FAA827280936BF000749D2 /* ReelsViewController.swift in Sources */, + 98A0CD8428097694009609C1 /* UILabel+.swift in Sources */, 985946A527FA7E5C00F7610D /* AppDelegate.swift in Sources */, + 98FAA82B280936E5000749D2 /* MyPageViewController.swift in Sources */, 985946A727FA7E5C00F7610D /* SceneDelegate.swift in Sources */, + 98FAA821280935F0000749D2 /* MainTabbarController.swift in Sources */, 986168C52805B29100A8859F /* Storyboard.swift in Sources */, + 98FAA825280936B0000749D2 /* SearchViewController.swift in Sources */, 986168C12805B27D00A8859F /* Const.swift in Sources */, + 98BE769C2809D37C0067D688 /* UIViewController+.swift in Sources */, 980D11DF27FD57DA0009F772 /* CompleteViewController.swift in Sources */, 98967EF927FD5EB60031138C /* JoinNameViewController.swift in Sources */, + 98FAA82328093696000749D2 /* HomeViewController.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/assignment/assignment/Configuration/AppExtension/UILabel+.swift b/assignment/assignment/Configuration/AppExtension/UILabel+.swift new file mode 100644 index 0000000..55991f3 --- /dev/null +++ b/assignment/assignment/Configuration/AppExtension/UILabel+.swift @@ -0,0 +1,21 @@ +// +// UILabel+.swift +// assignment +// +// Created by 이경민 on 2022/04/15. +// + +import UIKit + +extension UILabel { + ///Label의 일부만 색을 바꿀 수 있는 익스텐션 + func setPartialLabelColor(targetStringList: [String], color: UIColor?) { + let fullText = text ?? "" + let attributedString = NSMutableAttributedString(string: fullText) + targetStringList.forEach { + let range = (fullText as NSString).range(of: $0) + attributedString.addAttributes([.font: font as Any, .foregroundColor: color as Any], range: range) + } + attributedText = attributedString + } +} diff --git a/assignment/assignment/Configuration/AppExtension/UIViewController+.swift b/assignment/assignment/Configuration/AppExtension/UIViewController+.swift new file mode 100644 index 0000000..48fbd51 --- /dev/null +++ b/assignment/assignment/Configuration/AppExtension/UIViewController+.swift @@ -0,0 +1,20 @@ +// +// UIViewController+.swift +// assignment +// +// Created by 이경민 on 2022/04/16. +// + +import UIKit + +extension UIViewController { + func changeRootViewController(_ viewControllerToPresent: UIViewController) { + if let window = UIApplication.shared.windows.first { + window.rootViewController = viewControllerToPresent + UIView.transition(with: window, duration: 0.5, options: .transitionCrossDissolve, animations: nil) + } else { + viewControllerToPresent.modalPresentationStyle = .overFullScreen + self.present(viewControllerToPresent, animated: true, completion: nil) + } + } +} diff --git a/assignment/assignment/Configuration/Const/Storyboard.swift b/assignment/assignment/Configuration/Const/Storyboard.swift index 122bbcd..e7b1d10 100644 --- a/assignment/assignment/Configuration/Const/Storyboard.swift +++ b/assignment/assignment/Configuration/Const/Storyboard.swift @@ -12,7 +12,7 @@ extension Const { // MARK: - Tabbar - static let Tabbar = "Main" + static let Main = "Main" // MARK: - Auth @@ -22,12 +22,22 @@ extension Const { // MARK: - Home + static let Home = "Home" + // MARK: - Search + + static let Search = "Search" // MARK: - Reels + static let Reels = "Reels" + // MARK: - Shop + static let Shop = "Shop" + // MARK: - MyPage + + static let MyPage = "MyPage" } } diff --git a/assignment/assignment/Configuration/Const/ViewController.swift b/assignment/assignment/Configuration/Const/ViewController.swift index 47264ac..ff4677c 100644 --- a/assignment/assignment/Configuration/Const/ViewController.swift +++ b/assignment/assignment/Configuration/Const/ViewController.swift @@ -23,13 +23,23 @@ extension Const { // MARK: - Home + static let HomeVC = "HomeViewController" + // MARK: - Search + static let SearchVC = "SearchViewController" + // MARK: - Reels + static let ReelsVC = "ReelsViewController" + // MARK: - Shop + static let ShopVC = "ShopViewController" + // MARK: - MyPage + static let MyPageVC = "MyPageViewController" + } } diff --git a/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_home.imageset/Contents.json b/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_home.imageset/Contents.json index deeccae..1831894 100644 --- a/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_home.imageset/Contents.json +++ b/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_home.imageset/Contents.json @@ -19,5 +19,8 @@ "info" : { "author" : "xcode", "version" : 1 + }, + "properties" : { + "template-rendering-intent" : "template" } } diff --git a/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_home_selected.imageset/Contents.json b/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_home_selected.imageset/Contents.json index a4db00a..28619c4 100644 --- a/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_home_selected.imageset/Contents.json +++ b/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_home_selected.imageset/Contents.json @@ -19,5 +19,8 @@ "info" : { "author" : "xcode", "version" : 1 + }, + "properties" : { + "template-rendering-intent" : "template" } } diff --git a/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_password_hidden.imageset/Contents.json b/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_password_hidden.imageset/Contents.json index d02b756..2555f07 100644 --- a/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_password_hidden.imageset/Contents.json +++ b/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_password_hidden.imageset/Contents.json @@ -19,5 +19,8 @@ "info" : { "author" : "xcode", "version" : 1 + }, + "properties" : { + "template-rendering-intent" : "original" } } diff --git a/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_password_shown.imageset/Contents.json b/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_password_shown.imageset/Contents.json index 9901b73..e642bd3 100644 --- a/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_password_shown.imageset/Contents.json +++ b/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_password_shown.imageset/Contents.json @@ -19,5 +19,8 @@ "info" : { "author" : "xcode", "version" : 1 + }, + "properties" : { + "template-rendering-intent" : "original" } } diff --git a/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_profile.imageset/Contents.json b/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_profile.imageset/Contents.json index 839dae5..c68bd1e 100644 --- a/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_profile.imageset/Contents.json +++ b/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_profile.imageset/Contents.json @@ -19,5 +19,8 @@ "info" : { "author" : "xcode", "version" : 1 + }, + "properties" : { + "template-rendering-intent" : "original" } } diff --git a/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_profile_selected.imageset/Contents.json b/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_profile_selected.imageset/Contents.json index 7dec35f..c998565 100644 --- a/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_profile_selected.imageset/Contents.json +++ b/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_profile_selected.imageset/Contents.json @@ -19,5 +19,8 @@ "info" : { "author" : "xcode", "version" : 1 + }, + "properties" : { + "template-rendering-intent" : "original" } } diff --git a/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_reels.imageset/Contents.json b/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_reels.imageset/Contents.json index 1ad50a1..23e6d38 100644 --- a/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_reels.imageset/Contents.json +++ b/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_reels.imageset/Contents.json @@ -19,5 +19,8 @@ "info" : { "author" : "xcode", "version" : 1 + }, + "properties" : { + "template-rendering-intent" : "template" } } diff --git a/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_reels_selected.imageset/Contents.json b/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_reels_selected.imageset/Contents.json index 9ca9f2b..3e124c8 100644 --- a/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_reels_selected.imageset/Contents.json +++ b/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_reels_selected.imageset/Contents.json @@ -19,5 +19,8 @@ "info" : { "author" : "xcode", "version" : 1 + }, + "properties" : { + "template-rendering-intent" : "template" } } diff --git a/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_search.imageset/Contents.json b/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_search.imageset/Contents.json index 0025652..8dc840f 100644 --- a/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_search.imageset/Contents.json +++ b/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_search.imageset/Contents.json @@ -19,5 +19,8 @@ "info" : { "author" : "xcode", "version" : 1 + }, + "properties" : { + "template-rendering-intent" : "template" } } diff --git a/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_search_selected.imageset/Contents.json b/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_search_selected.imageset/Contents.json index dc7c627..e2d9784 100644 --- a/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_search_selected.imageset/Contents.json +++ b/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_search_selected.imageset/Contents.json @@ -19,5 +19,8 @@ "info" : { "author" : "xcode", "version" : 1 + }, + "properties" : { + "template-rendering-intent" : "template" } } diff --git a/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_shop.imageset/Contents.json b/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_shop.imageset/Contents.json index 1e111eb..d9ff000 100644 --- a/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_shop.imageset/Contents.json +++ b/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_shop.imageset/Contents.json @@ -19,5 +19,8 @@ "info" : { "author" : "xcode", "version" : 1 + }, + "properties" : { + "template-rendering-intent" : "template" } } diff --git a/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_shop_selected.imageset/Contents.json b/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_shop_selected.imageset/Contents.json index e5a9f1c..b4f6e08 100644 --- a/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_shop_selected.imageset/Contents.json +++ b/assignment/assignment/Configuration/Resources/Assets.xcassets/icn_shop_selected.imageset/Contents.json @@ -19,5 +19,8 @@ "info" : { "author" : "xcode", "version" : 1 + }, + "properties" : { + "template-rendering-intent" : "template" } } diff --git a/assignment/assignment/Scene/Base.lproj/Main.storyboard b/assignment/assignment/Scene/Base.lproj/Main.storyboard index f7b15fd..241f16d 100644 --- a/assignment/assignment/Scene/Base.lproj/Main.storyboard +++ b/assignment/assignment/Scene/Base.lproj/Main.storyboard @@ -1,32 +1,82 @@ - + - - - - + + - - - - - - - - - + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - diff --git a/assignment/assignment/Scene/Complete/Complete.storyboard b/assignment/assignment/Scene/Complete/Complete.storyboard index 7c3d393..a282edb 100644 --- a/assignment/assignment/Scene/Complete/Complete.storyboard +++ b/assignment/assignment/Scene/Complete/Complete.storyboard @@ -16,34 +16,57 @@ - + + + + + + + + + + + diff --git a/assignment/assignment/Scene/Complete/CompleteViewController.swift b/assignment/assignment/Scene/Complete/CompleteViewController.swift index cba32ab..2d2c7c2 100644 --- a/assignment/assignment/Scene/Complete/CompleteViewController.swift +++ b/assignment/assignment/Scene/Complete/CompleteViewController.swift @@ -33,16 +33,24 @@ final class CompleteViewController: UIViewController { } private func setButtonUI() { - completeButton.layer.cornerRadius = 15 + completeButton.layer.cornerRadius = 5 } private func setUserName() { - welcomeLabel.text = "\(userName)님 Instagram에 오신 것을 환영합니다" + welcomeLabel.text = """ + \(userName)님 Instagram에 + 오신 것을 환영합니다 + """ } // MARK: - IBAction @IBAction func completeButtonDidTap(_ sender: Any) { + guard let tabbarVC = UIStoryboard(name: Const.Storyboard.Main, bundle: nil).instantiateViewController(withIdentifier: Const.ViewController.MainTabbarVC) as? MainTabbarController else { return } + changeRootViewController(tabbarVC) + } + + @IBAction func anotherAccountButtonDidTap(_ sender: Any) { self.dismiss(animated: true) } } diff --git a/assignment/assignment/Scene/Home/Home.storyboard b/assignment/assignment/Scene/Home/Home.storyboard new file mode 100644 index 0000000..0acca96 --- /dev/null +++ b/assignment/assignment/Scene/Home/Home.storyboard @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assignment/assignment/Scene/Home/HomeViewController.swift b/assignment/assignment/Scene/Home/HomeViewController.swift new file mode 100644 index 0000000..c0ef2ae --- /dev/null +++ b/assignment/assignment/Scene/Home/HomeViewController.swift @@ -0,0 +1,15 @@ +// +// HomeViewController.swift +// assignment +// +// Created by 이경민 on 2022/04/15. +// + +import UIKit + +final class HomeViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + } +} diff --git a/assignment/assignment/Scene/Join/Join.storyboard b/assignment/assignment/Scene/Join/Join.storyboard index 1964b6a..ba15ace 100644 --- a/assignment/assignment/Scene/Join/Join.storyboard +++ b/assignment/assignment/Scene/Join/Join.storyboard @@ -16,43 +16,63 @@ - - + + + + + + + + + + + + + + + + + @@ -136,6 +231,8 @@ + + diff --git a/assignment/assignment/Scene/Join/JoinNameViewController.swift b/assignment/assignment/Scene/Join/JoinNameViewController.swift index 4a78a09..0e83877 100644 --- a/assignment/assignment/Scene/Join/JoinNameViewController.swift +++ b/assignment/assignment/Scene/Join/JoinNameViewController.swift @@ -34,7 +34,7 @@ final class JoinNameViewController: UIViewController { } private func setButtonUI() { - nextButton.layer.cornerRadius = 15 + nextButton.layer.cornerRadius = 5 } private func setTextField() { @@ -58,7 +58,7 @@ final class JoinNameViewController: UIViewController { } @IBAction func nextButtonDidTap(_ sender: Any) { - guard let passwordVC = self.storyboard?.instantiateViewController(withIdentifier: "JoinPasswordViewController") as? JoinPasswordViewController else { return } + guard let passwordVC = self.storyboard?.instantiateViewController(withIdentifier: Const.ViewController.JoinPasswordVC) as? JoinPasswordViewController else { return } passwordVC.userName = nameTextField.text ?? "" self.navigationController?.pushViewController(passwordVC, animated: true) } diff --git a/assignment/assignment/Scene/Join/JoinPasswordViewController.swift b/assignment/assignment/Scene/Join/JoinPasswordViewController.swift index 029bb6f..c194cbb 100644 --- a/assignment/assignment/Scene/Join/JoinPasswordViewController.swift +++ b/assignment/assignment/Scene/Join/JoinPasswordViewController.swift @@ -38,7 +38,7 @@ final class JoinPasswordViewController: UIViewController { } private func setButtonUI() { - nextButton.layer.cornerRadius = 15 + nextButton.layer.cornerRadius = 5 } private func setTextField() { @@ -61,8 +61,14 @@ final class JoinPasswordViewController: UIViewController { self.navigationController?.popViewController(animated: true) } + @IBAction func showPasswordButtonDidTap(_ sender: Any) { + let button = sender as? UIButton + button?.isSelected.toggle() + passwordTextField.isSecureTextEntry.toggle() + } + @IBAction func nextButtonDidTap(_ sender: Any) { - guard let completeVC = UIStoryboard(name: "Complete", bundle: nil).instantiateViewController(withIdentifier: "CompleteViewController") as? CompleteViewController else { return } + guard let completeVC = UIStoryboard(name: Const.Storyboard.Complete, bundle: nil).instantiateViewController(withIdentifier: Const.ViewController.CompleteVC) as? CompleteViewController else { return } completeVC.modalTransitionStyle = .crossDissolve completeVC.modalPresentationStyle = .fullScreen completeVC.userName = userName diff --git a/assignment/assignment/Scene/Login/Login.storyboard b/assignment/assignment/Scene/Login/Login.storyboard index c12bb6e..8453ddd 100644 --- a/assignment/assignment/Scene/Login/Login.storyboard +++ b/assignment/assignment/Scene/Login/Login.storyboard @@ -3,7 +3,6 @@ - @@ -18,80 +17,111 @@ - - - + + + + + - - - + + + + + - + + + + + + + + + + + + + + + + + + + + + + + - @@ -117,7 +147,9 @@ - + + + diff --git a/assignment/assignment/Scene/Login/LoginViewController.swift b/assignment/assignment/Scene/Login/LoginViewController.swift index 67de7f3..337de33 100644 --- a/assignment/assignment/Scene/Login/LoginViewController.swift +++ b/assignment/assignment/Scene/Login/LoginViewController.swift @@ -13,9 +13,8 @@ final class LoginViewController: UIViewController { @IBOutlet weak var emailTextField: UITextField! @IBOutlet weak var passwordTextField: UITextField! - @IBOutlet weak var showPasswordButton: UIButton! @IBOutlet weak var loginButton: UIButton! - + @IBOutlet weak var joinLabel: UILabel! // MARK: - LifeCycle @@ -34,12 +33,15 @@ final class LoginViewController: UIViewController { private func setUI() { setButtonUI() + setLabelUI() } private func setButtonUI() { - showPasswordButton.setImage(UIImage(systemName: "eye.fill"), for: .normal) - showPasswordButton.setImage(UIImage(systemName: "eye.slash.fill"), for: .selected) - loginButton.layer.cornerRadius = 10 + loginButton.layer.cornerRadius = 5 + } + + private func setLabelUI() { + joinLabel.setPartialLabelColor(targetStringList: ["가입하기"], color: UIColor.tintColor) } private func setTextField() { @@ -47,7 +49,7 @@ final class LoginViewController: UIViewController { $0?.addTarget(self, action: #selector(textFieldDidChange(_:)), for: .editingChanged) } } - + private func removeTextField() { [emailTextField, passwordTextField].forEach { $0?.text?.removeAll() @@ -63,12 +65,13 @@ final class LoginViewController: UIViewController { // MARK: - IBAction @IBAction func showPasswordButtonDidTap(_ sender: Any) { - showPasswordButton.isSelected.toggle() + let button = sender as? UIButton + button?.isSelected.toggle() passwordTextField.isSecureTextEntry.toggle() } @IBAction func completeButtonDidTap(_ sender: Any) { - guard let completeVC = UIStoryboard(name: "Complete", bundle: nil).instantiateViewController(withIdentifier: "CompleteViewController") as? CompleteViewController else { return } + guard let completeVC = UIStoryboard(name: Const.Storyboard.Complete, bundle: nil).instantiateViewController(withIdentifier: Const.ViewController.CompleteVC) as? CompleteViewController else { return } completeVC.modalTransitionStyle = .crossDissolve completeVC.modalPresentationStyle = .fullScreen completeVC.userName = emailTextField.text ?? "" @@ -76,7 +79,7 @@ final class LoginViewController: UIViewController { } @IBAction func joinButtonDidTap(_ sender: Any) { - guard let joinNameVC = UIStoryboard(name: "Join", bundle: nil).instantiateViewController(withIdentifier: "JoinNameViewController") as? JoinNameViewController else { return } + guard let joinNameVC = UIStoryboard(name: Const.Storyboard.Join, bundle: nil).instantiateViewController(withIdentifier: Const.ViewController.JoinNameVC) as? JoinNameViewController else { return } self.navigationController?.pushViewController(joinNameVC, animated: true) } } diff --git a/assignment/assignment/Scene/MainTabbarController.swift b/assignment/assignment/Scene/MainTabbarController.swift new file mode 100644 index 0000000..ade16d7 --- /dev/null +++ b/assignment/assignment/Scene/MainTabbarController.swift @@ -0,0 +1,32 @@ +// +// MainTabbarController.swift +// assignment +// +// Created by 이경민 on 2022/04/15. +// + +import UIKit + +final class MainTabbarController: UITabBarController { + + override func viewDidLoad() { + super.viewDidLoad() + setTabbar() + } + + private func setTabbar() { + var borderView = UIView(frame: CGRect(x: 0, y: 0, + width: UIScreen.main.bounds.width, height: 1.5)) + borderView.backgroundColor = UIColor(red: 218.0/255.0, green: 218.0/255.0, blue: 218.0/255.0, alpha: 1.0) + self.tabBar.addSubview(borderView) + + self.tabBar.tintColor = .black + self.tabBar.backgroundColor = .white + } + + override func tabBar(_ tabBar: UITabBar, didSelect item: UITabBarItem) { + tabBar.backgroundColor = item.tag == 3 ? .black : .white + tabBar.tintColor = item.tag == 3 ? .white : .black + tabBar.barTintColor = item.tag == 3 ? .white : .black + } +} diff --git a/assignment/assignment/Scene/MyPage/MyPage.storyboard b/assignment/assignment/Scene/MyPage/MyPage.storyboard new file mode 100644 index 0000000..45189e7 --- /dev/null +++ b/assignment/assignment/Scene/MyPage/MyPage.storyboard @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assignment/assignment/Scene/MyPage/MyPageViewController.swift b/assignment/assignment/Scene/MyPage/MyPageViewController.swift new file mode 100644 index 0000000..d2c3eec --- /dev/null +++ b/assignment/assignment/Scene/MyPage/MyPageViewController.swift @@ -0,0 +1,15 @@ +// +// MyPageViewController.swift +// assignment +// +// Created by 이경민 on 2022/04/15. +// + +import UIKit + +final class MyPageViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + } +} diff --git a/assignment/assignment/Scene/Reels/Reels.storyboard b/assignment/assignment/Scene/Reels/Reels.storyboard new file mode 100644 index 0000000..ca48220 --- /dev/null +++ b/assignment/assignment/Scene/Reels/Reels.storyboard @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assignment/assignment/Scene/Reels/ReelsViewController.swift b/assignment/assignment/Scene/Reels/ReelsViewController.swift new file mode 100644 index 0000000..7009f7b --- /dev/null +++ b/assignment/assignment/Scene/Reels/ReelsViewController.swift @@ -0,0 +1,15 @@ +// +// ReelsViewController.swift +// assignment +// +// Created by 이경민 on 2022/04/15. +// + +import UIKit + +final class ReelsViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + } +} diff --git a/assignment/assignment/Scene/Search/Search.storyboard b/assignment/assignment/Scene/Search/Search.storyboard new file mode 100644 index 0000000..e5cd153 --- /dev/null +++ b/assignment/assignment/Scene/Search/Search.storyboard @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assignment/assignment/Scene/Search/SearchViewController.swift b/assignment/assignment/Scene/Search/SearchViewController.swift new file mode 100644 index 0000000..6d532e1 --- /dev/null +++ b/assignment/assignment/Scene/Search/SearchViewController.swift @@ -0,0 +1,15 @@ +// +// SearchViewController.swift +// assignment +// +// Created by 이경민 on 2022/04/15. +// + +import UIKit + +final class SearchViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + } +} diff --git a/assignment/assignment/Scene/Shop/Shop.storyboard b/assignment/assignment/Scene/Shop/Shop.storyboard new file mode 100644 index 0000000..e9897a1 --- /dev/null +++ b/assignment/assignment/Scene/Shop/Shop.storyboard @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assignment/assignment/Scene/Shop/ShopViewController.swift b/assignment/assignment/Scene/Shop/ShopViewController.swift new file mode 100644 index 0000000..53f220b --- /dev/null +++ b/assignment/assignment/Scene/Shop/ShopViewController.swift @@ -0,0 +1,15 @@ +// +// ShopViewController.swift +// assignment +// +// Created by 이경민 on 2022/04/15. +// + +import UIKit + +final class ShopViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + } +}