diff --git a/NADA-iOS-forRelease.xcodeproj/project.pbxproj b/NADA-iOS-forRelease.xcodeproj/project.pbxproj index a5e0872f..512d6515 100644 --- a/NADA-iOS-forRelease.xcodeproj/project.pbxproj +++ b/NADA-iOS-forRelease.xcodeproj/project.pbxproj @@ -11,6 +11,8 @@ 390515B82706CEBB00C5F7A5 /* Colors.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 390515B72706CEBB00C5F7A5 /* Colors.xcassets */; }; 3909242F26FA15E800236C51 /* UIView+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3909242E26FA15E800236C51 /* UIView+Extension.swift */; }; 39288E12273F52B20072F403 /* CardListLookUpRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39288E11273F52B20072F403 /* CardListLookUpRequest.swift */; }; + 392F7FB4274621F1008CDBF5 /* MoreListTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 392F7FB2274621F1008CDBF5 /* MoreListTableViewCell.swift */; }; + 392F7FB5274621F1008CDBF5 /* MoreListTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 392F7FB3274621F1008CDBF5 /* MoreListTableViewCell.xib */; }; 39488E352706E17200BDC917 /* UIAlertController+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39488E342706E17200BDC917 /* UIAlertController+Extension.swift */; }; 394F314C27081B3A00C83291 /* FrontViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 394F314B27081B3A00C83291 /* FrontViewController.swift */; }; 394F314F27081B4C00C83291 /* Front.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 394F314E27081B4C00C83291 /* Front.storyboard */; }; @@ -26,16 +28,16 @@ 3979709826FA0BF0003FB4F5 /* Login.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3979709726FA0BF0003FB4F5 /* Login.storyboard */; }; 3981148E273BEBB300E28630 /* CardListEditRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3981148D273BEBB300E28630 /* CardListEditRequest.swift */; }; 39811490273BEBCE00E28630 /* CardListRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3981148F273BEBCE00E28630 /* CardListRequest.swift */; }; - 399C55D72711921100845A54 /* CustomTabBarButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 399C55D62711921100845A54 /* CustomTabBarButton.swift */; }; - 399C55D92711924500845A54 /* CustomTabBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 399C55D82711924500845A54 /* CustomTabBar.swift */; }; - 399C55DB2711927900845A54 /* CustomTabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 399C55DA2711927900845A54 /* CustomTabBarController.swift */; }; - 399C55DD271192D000845A54 /* CustomTabIndicatorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 399C55DC271192D000845A54 /* CustomTabIndicatorView.swift */; }; 399C55DF2711949D00845A54 /* CGPoint+Distance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 399C55DE2711949D00845A54 /* CGPoint+Distance.swift */; }; - 399C55E12711C21800845A54 /* CustomTabBar.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 399C55E02711C21800845A54 /* CustomTabBar.storyboard */; }; 39C1E88F270EC762006D2089 /* UIColor+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39C1E88E270EC762006D2089 /* UIColor+Extension.swift */; }; 39D13565273FDB9C00B1A148 /* Users.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39D13564273FDB9C00B1A148 /* Users.swift */; }; 39D13568273FDCB800B1A148 /* UserWithTokenRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39D13567273FDCB800B1A148 /* UserWithTokenRequest.swift */; }; 39D2E130270B43DA00AD0889 /* UIFont+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39D2E12F270B43DA00AD0889 /* UIFont+Extension.swift */; }; + 39D88B5F2745FB7E00A72164 /* MoreViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39D88B5E2745FB7E00A72164 /* MoreViewController.swift */; }; + 39D88B622745FBA900A72164 /* More.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 39D88B612745FBA900A72164 /* More.storyboard */; }; + 39D88B642745FDD400A72164 /* TabBar.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 39D88B632745FDD400A72164 /* TabBar.storyboard */; }; + 39D88B662745FE5F00A72164 /* TabBarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39D88B652745FE5F00A72164 /* TabBarViewController.swift */; }; + 39D88B6B274600B100A72164 /* CommonBottomSheetViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39D88B6A274600B100A72164 /* CommonBottomSheetViewController.swift */; }; 39F5A3D0271461EA00191F94 /* BackCardCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39F5A3CE271461EA00191F94 /* BackCardCell.swift */; }; 39F5A3D1271461EA00191F94 /* BackCardCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 39F5A3CF271461EA00191F94 /* BackCardCell.xib */; }; 7729171F2743D604001593E0 /* CardsInGroupResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7729171E2743D604001593E0 /* CardsInGroupResponse.swift */; }; @@ -94,6 +96,8 @@ 390515B72706CEBB00C5F7A5 /* Colors.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Colors.xcassets; sourceTree = ""; }; 3909242E26FA15E800236C51 /* UIView+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+Extension.swift"; sourceTree = ""; }; 39288E11273F52B20072F403 /* CardListLookUpRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardListLookUpRequest.swift; sourceTree = ""; }; + 392F7FB2274621F1008CDBF5 /* MoreListTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoreListTableViewCell.swift; sourceTree = ""; }; + 392F7FB3274621F1008CDBF5 /* MoreListTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MoreListTableViewCell.xib; sourceTree = ""; }; 39488E342706E17200BDC917 /* UIAlertController+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIAlertController+Extension.swift"; sourceTree = ""; }; 394F314B27081B3A00C83291 /* FrontViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FrontViewController.swift; sourceTree = ""; }; 394F314E27081B4C00C83291 /* Front.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Front.storyboard; sourceTree = ""; }; @@ -109,16 +113,16 @@ 3979709726FA0BF0003FB4F5 /* Login.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Login.storyboard; sourceTree = ""; }; 3981148D273BEBB300E28630 /* CardListEditRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardListEditRequest.swift; sourceTree = ""; }; 3981148F273BEBCE00E28630 /* CardListRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardListRequest.swift; sourceTree = ""; }; - 399C55D62711921100845A54 /* CustomTabBarButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomTabBarButton.swift; sourceTree = ""; }; - 399C55D82711924500845A54 /* CustomTabBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomTabBar.swift; sourceTree = ""; }; - 399C55DA2711927900845A54 /* CustomTabBarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomTabBarController.swift; sourceTree = ""; }; - 399C55DC271192D000845A54 /* CustomTabIndicatorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomTabIndicatorView.swift; sourceTree = ""; }; 399C55DE2711949D00845A54 /* CGPoint+Distance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CGPoint+Distance.swift"; sourceTree = ""; }; - 399C55E02711C21800845A54 /* CustomTabBar.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = CustomTabBar.storyboard; sourceTree = ""; }; 39C1E88E270EC762006D2089 /* UIColor+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+Extension.swift"; sourceTree = ""; }; 39D13564273FDB9C00B1A148 /* Users.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Users.swift; sourceTree = ""; }; 39D13567273FDCB800B1A148 /* UserWithTokenRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserWithTokenRequest.swift; sourceTree = ""; }; 39D2E12F270B43DA00AD0889 /* UIFont+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIFont+Extension.swift"; sourceTree = ""; }; + 39D88B5E2745FB7E00A72164 /* MoreViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoreViewController.swift; sourceTree = ""; }; + 39D88B612745FBA900A72164 /* More.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = More.storyboard; sourceTree = ""; }; + 39D88B632745FDD400A72164 /* TabBar.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = TabBar.storyboard; sourceTree = ""; }; + 39D88B652745FE5F00A72164 /* TabBarViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabBarViewController.swift; sourceTree = ""; }; + 39D88B6A274600B100A72164 /* CommonBottomSheetViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommonBottomSheetViewController.swift; sourceTree = ""; }; 39F5A3CE271461EA00191F94 /* BackCardCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BackCardCell.swift; sourceTree = ""; }; 39F5A3CF271461EA00191F94 /* BackCardCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BackCardCell.xib; sourceTree = ""; }; 4A2183AE0E469153221624A0 /* Pods_NADA_iOS_forRelease.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_NADA_iOS_forRelease.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -195,6 +199,15 @@ path = Pods; sourceTree = ""; }; + 392F7FB1274621CF008CDBF5 /* MoreList */ = { + isa = PBXGroup; + children = ( + 392F7FB2274621F1008CDBF5 /* MoreListTableViewCell.swift */, + 392F7FB3274621F1008CDBF5 /* MoreListTableViewCell.xib */, + ); + path = MoreList; + sourceTree = ""; + }; 394F314A2708157500C83291 /* Main */ = { isa = PBXGroup; children = ( @@ -269,22 +282,36 @@ path = User; sourceTree = ""; }; - 399C55D5271191EC00845A54 /* CustomTabBar */ = { + 39D88B5D2745FB5E00A72164 /* More */ = { + isa = PBXGroup; + children = ( + 39D88B5E2745FB7E00A72164 /* MoreViewController.swift */, + ); + path = More; + sourceTree = ""; + }; + 39D88B602745FBA100A72164 /* More */ = { isa = PBXGroup; children = ( - 399C55D62711921100845A54 /* CustomTabBarButton.swift */, - 399C55D82711924500845A54 /* CustomTabBar.swift */, - 399C55DC271192D000845A54 /* CustomTabIndicatorView.swift */, + 39D88B612745FBA900A72164 /* More.storyboard */, ); - path = CustomTabBar; + path = More; sourceTree = ""; }; - 399C55E22711C6D500845A54 /* CustomTabBar */ = { + 39D88B682745FE6C00A72164 /* TabBar */ = { isa = PBXGroup; children = ( - 399C55DA2711927900845A54 /* CustomTabBarController.swift */, + 39D88B652745FE5F00A72164 /* TabBarViewController.swift */, ); - path = CustomTabBar; + path = TabBar; + sourceTree = ""; + }; + 39D88B692746009B00A72164 /* BottomSheet */ = { + isa = PBXGroup; + children = ( + 39D88B6A274600B100A72164 /* CommonBottomSheetViewController.swift */, + ); + path = BottomSheet; sourceTree = ""; }; 4D28D444572353D68574D2B0 /* Frameworks */ = { @@ -513,6 +540,7 @@ F8FC439B26C01EC30033E151 /* Cells */ = { isa = PBXGroup; children = ( + 392F7FB1274621CF008CDBF5 /* MoreList */, F84BAFA126FDB4E5004CA335 /* CreationCard */, 39523E582701A47400536900 /* CardList */, F83206AC26F61E5800D61711 /* CardCell */, @@ -560,9 +588,11 @@ F8FC43A026C01F040033E151 /* ViewControllers */ = { isa = PBXGroup; children = ( - 399C55E22711C6D500845A54 /* CustomTabBar */, - 3958F237270FFB8700B100B2 /* Group */, + 39D88B692746009B00A72164 /* BottomSheet */, + 39D88B682745FE6C00A72164 /* TabBar */, 394F314A2708157500C83291 /* Main */, + 3958F237270FFB8700B100B2 /* Group */, + 39D88B5D2745FB5E00A72164 /* More */, F84BAFB326FDB8AA004CA335 /* CardCreation */, 39523E072701848E00536900 /* CardList */, 3979709426FA0BD8003FB4F5 /* Login */, @@ -573,7 +603,6 @@ F8FC43A126C01F1F0033E151 /* Views */ = { isa = PBXGroup; children = ( - 399C55D5271191EC00845A54 /* CustomTabBar */, F8FC43B426C020C10033E151 /* TempViews.swift */, ); path = Views; @@ -582,13 +611,14 @@ F8FC43A226C01F2B0033E151 /* Storyboards */ = { isa = PBXGroup; children = ( - 3958F23A270FFBC800B100B2 /* Group */, 394F314D27081B4100C83291 /* Main */, + 3958F23A270FFBC800B100B2 /* Group */, + 39D88B602745FBA100A72164 /* More */, F84BAF9E26FDB425004CA335 /* CardCreation */, F8FC439026C01CDE0033E151 /* LaunchScreen.storyboard */, 3979709726FA0BF0003FB4F5 /* Login.storyboard */, 39523E0A270184B100536900 /* CardList.storyboard */, - 399C55E02711C21800845A54 /* CustomTabBar.storyboard */, + 39D88B632745FDD400A72164 /* TabBar.storyboard */, ); path = Storyboards; sourceTree = ""; @@ -680,6 +710,7 @@ buildActionMask = 2147483647; files = ( F8FC43BF26C025180033E151 /* .swiftlint.yml in Resources */, + 39D88B622745FBA900A72164 /* More.storyboard in Resources */, F82FF8262702000000E57F8B /* RequiredFlavorCollectionViewCell.xib in Resources */, F858079F2700354E00872484 /* BackgroundCollectionViewCell.xib in Resources */, F84BAFAE26FDB543004CA335 /* FrontCardCreationCollectionViewCell.xib in Resources */, @@ -688,13 +719,14 @@ 394F314F27081B4C00C83291 /* Front.storyboard in Resources */, 3979709826FA0BF0003FB4F5 /* Login.storyboard in Resources */, F84BAFB226FDB552004CA335 /* BackCardCreationCollectionViewCell.xib in Resources */, + 39D88B642745FDD400A72164 /* TabBar.storyboard in Resources */, 39523E5C2701A48900536900 /* CardListTableViewCell.xib in Resources */, F8FC439226C01CDE0033E151 /* LaunchScreen.storyboard in Resources */, F8FC438F26C01CDE0033E151 /* Assets.xcassets in Resources */, 39F5A3D1271461EA00191F94 /* BackCardCell.xib in Resources */, - 399C55E12711C21800845A54 /* CustomTabBar.storyboard in Resources */, 39523E0B270184B100536900 /* CardList.storyboard in Resources */, F82FF81D2701EBCE00E57F8B /* CardCreation.storyboard in Resources */, + 392F7FB5274621F1008CDBF5 /* MoreListTableViewCell.xib in Resources */, 390515B82706CEBB00C5F7A5 /* Colors.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -783,7 +815,6 @@ 39488E352706E17200BDC917 /* UIAlertController+Extension.swift in Sources */, F8C310C0273A7360008EC5BA /* FrontCardCreationDelegate.swift in Sources */, F8C83FBF272FA0670009DF0D /* UserSevice.swift in Sources */, - 399C55DB2711927900845A54 /* CustomTabBarController.swift in Sources */, 39F5A3D0271461EA00191F94 /* BackCardCell.swift in Sources */, 39C1E88F270EC762006D2089 /* UIColor+Extension.swift in Sources */, F8C83FC9272FA3190009DF0D /* GroupAPI.swift in Sources */, @@ -793,27 +824,28 @@ F8F5D0AA270800FD00D99D2E /* Xib.swift in Sources */, F82FF8252702000000E57F8B /* RequiredFlavorCollectionViewCell.swift in Sources */, F8C83FC7272FA2A20009DF0D /* CardService.swift in Sources */, + 39D88B662745FE5F00A72164 /* TabBarViewController.swift in Sources */, F871227827330A3800A24E74 /* CardCreationRequest.swift in Sources */, + 39D88B5F2745FB7E00A72164 /* MoreViewController.swift in Sources */, F8FC43B326C020B90033E151 /* BackCardCreationDelegate.swift in Sources */, 39584581273E951C009CC6B9 /* MainListRequest.swift in Sources */, F8FC43B526C020C10033E151 /* TempViews.swift in Sources */, F8C83FBB272F9F370009DF0D /* NetworkResult.swift in Sources */, 39D2E130270B43DA00AD0889 /* UIFont+Extension.swift in Sources */, 39523E5B2701A48900536900 /* CardListTableViewCell.swift in Sources */, - 399C55D72711921100845A54 /* CustomTabBarButton.swift in Sources */, F8A9FE1A2743DC6B00BC60CE /* CardListInGroupRequest.swift in Sources */, 3981148E273BEBB300E28630 /* CardListEditRequest.swift in Sources */, + 39D88B6B274600B100A72164 /* CommonBottomSheetViewController.swift in Sources */, F8FC43BA26C022900033E151 /* ViewController.swift in Sources */, 39523E5F2701AA9000536900 /* CardListDataModel.swift in Sources */, - 399C55D92711924500845A54 /* CustomTabBar.swift in Sources */, 39D13568273FDCB800B1A148 /* UserWithTokenRequest.swift in Sources */, F8FC43AD26C020940033E151 /* TempClass.swift in Sources */, F84BAFB126FDB552004CA335 /* BackCardCreationCollectionViewCell.swift in Sources */, 39811490273BEBCE00E28630 /* CardListRequest.swift in Sources */, F8FC43BC26C022A20033E151 /* Storyboard.swift in Sources */, - 399C55DD271192D000845A54 /* CustomTabIndicatorView.swift in Sources */, F8C83FC1272FA06E0009DF0D /* UserAPI.swift in Sources */, F8C83FC3272FA17B0009DF0D /* URL.swift in Sources */, + 392F7FB4274621F1008CDBF5 /* MoreListTableViewCell.swift in Sources */, 77AA68EA273E0EC4009C89B0 /* CardAddInGroupRequest.swift in Sources */, F8C83FAE272F99940009DF0D /* MoyaLoggerPlugin.swift in Sources */, F84BAFAD26FDB543004CA335 /* FrontCardCreationCollectionViewCell.swift in Sources */, diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHome.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHome.imageset/Contents.json new file mode 100644 index 00000000..582f0249 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHome.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x", + "filename" : "iconHome.png" + }, + { + "filename" : "iconHome@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "scale" : "3x", + "idiom" : "universal", + "filename" : "iconHome@3x.png" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHome.imageset/iconHome.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHome.imageset/iconHome.png new file mode 100644 index 00000000..3fe6a4d2 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHome.imageset/iconHome.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHome.imageset/iconHome@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHome.imageset/iconHome@2x.png new file mode 100644 index 00000000..e8c985e3 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHome.imageset/iconHome@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHome.imageset/iconHome@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHome.imageset/iconHome@3x.png new file mode 100644 index 00000000..e13f9522 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHome.imageset/iconHome@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Constants/Storyboard.swift b/NADA-iOS-forRelease/Resouces/Constants/Storyboard.swift index ed4aa33d..5d13862c 100644 --- a/NADA-iOS-forRelease/Resouces/Constants/Storyboard.swift +++ b/NADA-iOS-forRelease/Resouces/Constants/Storyboard.swift @@ -16,7 +16,7 @@ extension Const { static let cardList = "CardList" static let front = "Front" static let group = "Group" - static let customTabBar = "CustomTabBar" + static let tabBar = "TabBar" } } diff --git a/NADA-iOS-forRelease/Resouces/Constants/ViewController.swift b/NADA-iOS-forRelease/Resouces/Constants/ViewController.swift index f3d56491..735bb899 100644 --- a/NADA-iOS-forRelease/Resouces/Constants/ViewController.swift +++ b/NADA-iOS-forRelease/Resouces/Constants/ViewController.swift @@ -17,7 +17,7 @@ extension Const { static let frontViewController = "FrontViewController" static let groupViewController = "GroupViewController" static let tabBarViewController = "TabBarViewController" - static let customTabBarController = "CustomTabBarController" + static let commonBottomSheetViewController = "CommonBottomSheetViewController" } } } diff --git a/NADA-iOS-forRelease/Resouces/Storyboards/CardList.storyboard b/NADA-iOS-forRelease/Resouces/Storyboards/CardList.storyboard index 9a0433df..61dc448d 100644 --- a/NADA-iOS-forRelease/Resouces/Storyboards/CardList.storyboard +++ b/NADA-iOS-forRelease/Resouces/Storyboards/CardList.storyboard @@ -6,81 +6,82 @@ + - + - - + + - + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + - - + + - - - - - - - - - - - + + + + + + + + - + - + - + - - - + + + + + + diff --git a/NADA-iOS-forRelease/Resouces/Storyboards/CustomTabBar.storyboard b/NADA-iOS-forRelease/Resouces/Storyboards/CustomTabBar.storyboard deleted file mode 100644 index 0eea2460..00000000 --- a/NADA-iOS-forRelease/Resouces/Storyboards/CustomTabBar.storyboard +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/NADA-iOS-forRelease/Resouces/Storyboards/Group/Group.storyboard b/NADA-iOS-forRelease/Resouces/Storyboards/Group/Group.storyboard index c2af4282..0f4ddc03 100644 --- a/NADA-iOS-forRelease/Resouces/Storyboards/Group/Group.storyboard +++ b/NADA-iOS-forRelease/Resouces/Storyboards/Group/Group.storyboard @@ -1,15 +1,15 @@ - + - + - + @@ -17,9 +17,9 @@ - + - + @@ -28,9 +28,10 @@ - - - + + + + diff --git a/NADA-iOS-forRelease/Resouces/Storyboards/Login.storyboard b/NADA-iOS-forRelease/Resouces/Storyboards/Login.storyboard index f9e75158..95194504 100644 --- a/NADA-iOS-forRelease/Resouces/Storyboards/Login.storyboard +++ b/NADA-iOS-forRelease/Resouces/Storyboards/Login.storyboard @@ -4,6 +4,7 @@ + @@ -16,119 +17,71 @@ - - + + - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - + + + + + + @@ -138,9 +91,14 @@ - - - - + + + + + + + + + diff --git a/NADA-iOS-forRelease/Resouces/Storyboards/Main/Front.storyboard b/NADA-iOS-forRelease/Resouces/Storyboards/Main/Front.storyboard index a05106e1..bcf7d2c9 100644 --- a/NADA-iOS-forRelease/Resouces/Storyboards/Main/Front.storyboard +++ b/NADA-iOS-forRelease/Resouces/Storyboards/Main/Front.storyboard @@ -6,6 +6,7 @@ + @@ -17,106 +18,82 @@ - - + + - + - - - - - - - - - + - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - + + + - - - - - - - + + + + + + + + - + - + - + @@ -132,18 +109,18 @@ - - - - + + + + - - - - - + + + + + diff --git a/NADA-iOS-forRelease/Resouces/Storyboards/More/More.storyboard b/NADA-iOS-forRelease/Resouces/Storyboards/More/More.storyboard new file mode 100644 index 00000000..7e113127 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Storyboards/More/More.storyboard @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Resouces/Storyboards/TabBar.storyboard b/NADA-iOS-forRelease/Resouces/Storyboards/TabBar.storyboard new file mode 100644 index 00000000..03f5dbef --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Storyboards/TabBar.storyboard @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Sources/AppModel/CardList/CardListDataModel.swift b/NADA-iOS-forRelease/Sources/AppModel/CardList/CardListDataModel.swift index 0c024026..068011fe 100644 --- a/NADA-iOS-forRelease/Sources/AppModel/CardList/CardListDataModel.swift +++ b/NADA-iOS-forRelease/Sources/AppModel/CardList/CardListDataModel.swift @@ -9,5 +9,4 @@ import Foundation struct CardListDataModel { var title: String - var date: String } diff --git a/NADA-iOS-forRelease/Sources/Cells/CardCell/BackCardCell.swift b/NADA-iOS-forRelease/Sources/Cells/CardCell/BackCardCell.swift index 8b2a86c0..71af259f 100644 --- a/NADA-iOS-forRelease/Sources/Cells/CardCell/BackCardCell.swift +++ b/NADA-iOS-forRelease/Sources/Cells/CardCell/BackCardCell.swift @@ -20,10 +20,9 @@ class BackCardCell: CardCell { @IBOutlet weak var putSauceEatImageView: UIImageView! @IBOutlet weak var sauceChickenImageView: UIImageView! @IBOutlet weak var friedChickenImageView: UIImageView! - @IBOutlet weak var firstQuestionLabel: UILabel! - @IBOutlet weak var firstAnswerLabel: UILabel! - @IBOutlet weak var secondQuestionLabel: UILabel! - @IBOutlet weak var secondAnswerLabel: UILabel! + @IBOutlet weak var firstTmiLabel: UILabel! + @IBOutlet weak var secondTmiLabel: UILabel! + @IBOutlet weak var thirdTmiLabel: UILabel! // MARK: - View Life Cycle override func awakeFromNib() { @@ -52,10 +51,9 @@ extension BackCardCell { _ putSauceImage: String, _ yangnyumImage: String, _ friedImage: String, - _ firstQuestion: String, - _ firstAnswer: String, - _ secondQuestion: String, - _ secondAnswer: String) { + _ firstTmi: String, + _ secondTmi: String, + _ thirdTmi: String) { if let bgImage = UIImage(named: backgroundImage) { self.backgroundImageView.image = bgImage } @@ -83,9 +81,9 @@ extension BackCardCell { if let friedImage = UIImage(named: friedImage) { self.friedChickenImageView.image = friedImage } - self.firstQuestionLabel.text = firstQuestion - self.firstAnswerLabel.text = firstAnswer - self.secondQuestionLabel.text = secondQuestion - self.secondAnswerLabel.text = secondAnswer + + self.firstTmiLabel.text = firstTmi + self.secondTmiLabel.text = secondTmi + self.thirdTmiLabel.text = thirdTmi } } diff --git a/NADA-iOS-forRelease/Sources/Cells/CardCell/BackCardCell.xib b/NADA-iOS-forRelease/Sources/Cells/CardCell/BackCardCell.xib index 847fe7cf..73445924 100644 --- a/NADA-iOS-forRelease/Sources/Cells/CardCell/BackCardCell.xib +++ b/NADA-iOS-forRelease/Sources/Cells/CardCell/BackCardCell.xib @@ -1,9 +1,9 @@ - + - + @@ -12,199 +12,166 @@ - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + + + - - - - + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -213,28 +180,25 @@ - - - - + + + - - - - - - - + + + + + + + - - - - - + + + diff --git a/NADA-iOS-forRelease/Sources/Cells/CardCell/FrontCardCell.xib b/NADA-iOS-forRelease/Sources/Cells/CardCell/FrontCardCell.xib index f4fddab7..40906d0c 100644 --- a/NADA-iOS-forRelease/Sources/Cells/CardCell/FrontCardCell.xib +++ b/NADA-iOS-forRelease/Sources/Cells/CardCell/FrontCardCell.xib @@ -1,9 +1,9 @@ - + - + @@ -11,14 +11,14 @@ - + - + - + @@ -56,31 +56,31 @@ - + - + - + diff --git a/NADA-iOS-forRelease/Sources/Cells/CardList/CardListTableViewCell.swift b/NADA-iOS-forRelease/Sources/Cells/CardList/CardListTableViewCell.swift index b6af5bbd..6d1641b5 100644 --- a/NADA-iOS-forRelease/Sources/Cells/CardList/CardListTableViewCell.swift +++ b/NADA-iOS-forRelease/Sources/Cells/CardList/CardListTableViewCell.swift @@ -11,7 +11,7 @@ class CardListTableViewCell: UITableViewCell { @IBOutlet weak var pinButton: UIButton! @IBOutlet weak var titleLabel: UILabel! - @IBOutlet weak var dateLabel: UILabel! + @IBOutlet weak var reorderButton: UIButton! override func awakeFromNib() { super.awakeFromNib() @@ -30,12 +30,14 @@ class CardListTableViewCell: UITableViewCell { // 핀 이미지 클릭 시 @IBAction func pinButtonClicked(_ sender: Any) { - let pinImage = UIImage(named: "pushPinBlackFilled") + let pinImage = UIImage(named: "iconPin") if pinButton.currentImage == pinImage { - pinButton.setImage(UIImage(named: "pushPinBlack"), for: UIControl.State.normal) + pinButton.setImage(UIImage(named: "iconPinInactive"), for: UIControl.State.normal) + reorderButton.isHidden = false } else { - pinButton.setImage(UIImage(named: "pushPinBlackFilled"), for: UIControl.State.normal) + pinButton.setImage(UIImage(named: "iconPin"), for: UIControl.State.normal) + reorderButton.isHidden = true } } @@ -43,9 +45,7 @@ class CardListTableViewCell: UITableViewCell { } - func initData(title: String, - date: String) { + func initData(title: String) { titleLabel.text = title - dateLabel.text = date } } diff --git a/NADA-iOS-forRelease/Sources/Cells/CardList/CardListTableViewCell.xib b/NADA-iOS-forRelease/Sources/Cells/CardList/CardListTableViewCell.xib index 7fa08414..275f1b24 100644 --- a/NADA-iOS-forRelease/Sources/Cells/CardList/CardListTableViewCell.xib +++ b/NADA-iOS-forRelease/Sources/Cells/CardList/CardListTableViewCell.xib @@ -1,9 +1,9 @@ - + - + @@ -12,93 +12,87 @@ - + - + - + - - - + + - + - - + + - + - - + + - + - + + - - - + + - - + + diff --git a/NADA-iOS-forRelease/Sources/Cells/MoreList/MoreListTableViewCell.swift b/NADA-iOS-forRelease/Sources/Cells/MoreList/MoreListTableViewCell.swift new file mode 100644 index 00000000..479337e5 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/MoreList/MoreListTableViewCell.swift @@ -0,0 +1,23 @@ +// +// MoreListTableViewCell.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/11/18. +// + +import UIKit + +class MoreListTableViewCell: UITableViewCell { + + override func awakeFromNib() { + super.awakeFromNib() + // Initialization code + } + + override func setSelected(_ selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + + // Configure the view for the selected state + } + +} diff --git a/NADA-iOS-forRelease/Sources/Cells/MoreList/MoreListTableViewCell.xib b/NADA-iOS-forRelease/Sources/Cells/MoreList/MoreListTableViewCell.xib new file mode 100644 index 00000000..c8f1983f --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/MoreList/MoreListTableViewCell.xib @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Sources/SceneDelegate.swift b/NADA-iOS-forRelease/Sources/SceneDelegate.swift index 027f33cf..9228b3f2 100644 --- a/NADA-iOS-forRelease/Sources/SceneDelegate.swift +++ b/NADA-iOS-forRelease/Sources/SceneDelegate.swift @@ -21,7 +21,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { window = UIWindow(frame: windowScene.coordinateSpace.bounds) window?.windowScene = windowScene - window?.rootViewController = UIStoryboard(name: Const.Storyboard.Name.customTabBar, bundle: nil).instantiateViewController(withIdentifier: Const.ViewController.Identifier.customTabBarController) + window?.rootViewController = UIStoryboard(name: Const.Storyboard.Name.tabBar, bundle: nil).instantiateViewController(withIdentifier: Const.ViewController.Identifier.tabBarViewController) // window?.rootViewController = TabBarViewController() window?.makeKeyAndVisible() diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/BottomSheet/CommonBottomSheetViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/BottomSheet/CommonBottomSheetViewController.swift new file mode 100644 index 00000000..bffb6929 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/ViewControllers/BottomSheet/CommonBottomSheetViewController.swift @@ -0,0 +1,226 @@ +// +// CommonBottomSheetViewController.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/11/18. +// + +import UIKit + +/** + 공통으로 사용할 수 있도록 만들어둔 바텀 시트입니다. + + 1) CommonBottomSheetViewController에는 공통으로 필요한 요소들만 구현해둔 상태 + 2) CommonBottomSheetViewController를 상속받은 뷰컨 생성 (예시: InheritanceViewController) + 3) InheritanceViewController에 텍스트 필드, 피커 뷰, 버튼 등 각 화면에 맞는 추가 기능 구현 + 4) .setHeight 메서드 파라미터로 높이값을 조정 (default값은 475) + 5) .setTitle 메서드 파라미터로 가장 상단 타이틀 라벨에 들어갈 내용 입력 (String) + 6) present 방식으로 화면에 표출 +*/ + +class CommonBottomSheetViewController: UIViewController { + + // MARK: - Properties + // 바텀 시트 높이 + var bottomHeight: CGFloat = 475 + + // bottomSheet가 view의 상단에서 떨어진 거리 + private var bottomSheetViewTopConstraint: NSLayoutConstraint! + + // 기존 화면을 흐려지게 만들기 위한 뷰 + private let dimmedBackView: UIView = { + let view = UIView() + view.backgroundColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.5) + return view + }() + + // 바텀 시트 뷰 + let bottomSheetView: UIView = { + let view = UIView() + view.backgroundColor = .white + + view.layer.cornerRadius = 27 + view.layer.maskedCorners = [.layerMinXMinYCorner, .layerMaxXMinYCorner] + view.clipsToBounds = true + + return view + }() + + // 자연스러운 애니메이션을 위한..커버.. + let bottomSheetCoverView: UIView = { + let view = UIView() + view.backgroundColor = .white + + view.layer.cornerRadius = 27 + view.layer.maskedCorners = [.layerMinXMinYCorner, .layerMaxXMinYCorner] + view.clipsToBounds = true + + return view + }() + + // dismiss Indicator View UI 구성 부분 + private let dismissIndicatorView: UIView = { + let view = UIView() + view.backgroundColor = .systemGray2 + view.layer.cornerRadius = 3 + + return view + }() + + // 바텀 시트 메인 라벨 + public let titleLabel: UILabel = { + let label = UILabel() + label.font = .systemFont(ofSize: 20, weight: .bold) + label.textAlignment = .center + + return label + }() + + // MARK: - View Life Cycle + override func viewDidLoad() { + super.viewDidLoad() + + setupUI() + setupGestureRecognizer() + } + + override func viewDidAppear(_ animated: Bool) { + super.viewDidAppear(animated) + + showBottomSheet() + } + + // MARK: - @Functions + // UI 세팅 작업 + private func setupUI() { + view.addSubview(dimmedBackView) + view.addSubview(bottomSheetView) + view.addSubview(dismissIndicatorView) + view.addSubview(titleLabel) + view.addSubview(bottomSheetCoverView) + + dimmedBackView.alpha = 0.0 + setupLayout() + } + + // GestureRecognizer 세팅 작업 + private func setupGestureRecognizer() { + // 흐린 부분 탭할 때, 바텀시트를 내리는 TapGesture + let dimmedTap = UITapGestureRecognizer(target: self, action: #selector(dimmedViewTapped(_:))) + dimmedBackView.addGestureRecognizer(dimmedTap) + dimmedBackView.isUserInteractionEnabled = true + + // 스와이프 했을 때, 바텀시트를 내리는 swipeGesture + let swipeGesture = UISwipeGestureRecognizer(target: self, action: #selector(panGesture)) + swipeGesture.direction = .down + view.addGestureRecognizer(swipeGesture) + } + + // 레이아웃 세팅 + private func setupLayout() { + dimmedBackView.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + dimmedBackView.topAnchor.constraint(equalTo: view.topAnchor), + dimmedBackView.leadingAnchor.constraint(equalTo: view.leadingAnchor), + dimmedBackView.trailingAnchor.constraint(equalTo: view.trailingAnchor), + dimmedBackView.bottomAnchor.constraint(equalTo: view.bottomAnchor) + ]) + + bottomSheetView.translatesAutoresizingMaskIntoConstraints = false + let topConstant = view.safeAreaInsets.bottom + view.safeAreaLayoutGuide.layoutFrame.height + bottomSheetViewTopConstraint = bottomSheetView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: topConstant) + NSLayoutConstraint.activate([ + bottomSheetView.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor), + bottomSheetView.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor), + bottomSheetView.bottomAnchor.constraint(equalTo: view.bottomAnchor), + bottomSheetViewTopConstraint + ]) + + bottomSheetCoverView.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + bottomSheetCoverView.topAnchor.constraint(equalTo: bottomSheetView.topAnchor), + bottomSheetCoverView.leadingAnchor.constraint(equalTo: bottomSheetView.leadingAnchor), + bottomSheetCoverView.trailingAnchor.constraint(equalTo: bottomSheetView.trailingAnchor), + bottomSheetCoverView.bottomAnchor.constraint(equalTo: bottomSheetView.bottomAnchor) + ]) + + dismissIndicatorView.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + dismissIndicatorView.widthAnchor.constraint(equalToConstant: 102), + dismissIndicatorView.heightAnchor.constraint(equalToConstant: 7), + dismissIndicatorView.topAnchor.constraint(equalTo: bottomSheetView.topAnchor, constant: 12), + dismissIndicatorView.centerXAnchor.constraint(equalTo: bottomSheetView.centerXAnchor) + ]) + + titleLabel.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + titleLabel.topAnchor.constraint(equalTo: dismissIndicatorView.bottomAnchor, constant: 28), + titleLabel.widthAnchor.constraint(equalToConstant: 100), + titleLabel.centerXAnchor.constraint(equalTo: bottomSheetView.centerXAnchor) + ]) + } + + // 바텀 시트 표출 애니메이션 + private func showBottomSheet() { + let safeAreaHeight: CGFloat = view.safeAreaLayoutGuide.layoutFrame.height + let bottomPadding: CGFloat = view.safeAreaInsets.bottom + + bottomSheetViewTopConstraint.constant = (safeAreaHeight + bottomPadding) - bottomHeight + + UIView.animate(withDuration: 0.2, delay: 0, options: .curveEaseOut, animations: { + self.dimmedBackView.alpha = 0.5 + self.view.layoutIfNeeded() + }, completion: { _ in + self.bottomSheetCoverView.isHidden = true + }) + } + + // 바텀 시트 사라지는 애니메이션 + func hideBottomSheetAndGoBack() { + let safeAreaHeight = view.safeAreaLayoutGuide.layoutFrame.height + let bottomPadding = view.safeAreaInsets.bottom + bottomSheetViewTopConstraint.constant = safeAreaHeight + bottomPadding + UIView.animate(withDuration: 0.2, delay: 0, options: .curveEaseOut, animations: { + self.dimmedBackView.alpha = 0.0 + self.view.layoutIfNeeded() + self.bottomSheetCoverView.isHidden = false + }) { _ in + if self.presentingViewController != nil { + self.dismiss(animated: false, completion: nil) + } + } + } + + // UITapGestureRecognizer 연결 함수 부분 + @objc private func dimmedViewTapped(_ tapRecognizer: UITapGestureRecognizer) { + hideBottomSheetAndGoBack() + } + + // UISwipeGestureRecognizer 연결 함수 부분 + @objc func panGesture(_ recognizer: UISwipeGestureRecognizer) { + if recognizer.state == .ended { + switch recognizer.direction { + case .down: + hideBottomSheetAndGoBack() + default: + break + } + } + } +} + +// MARK: - Extensions +// 재사용을 위한 함수는 extension에 구현 +extension CommonBottomSheetViewController { + // 바텀 시트 높이 설정 + func setHeight(_ height: CGFloat) -> Self { + bottomHeight = height + return self + } + + // 타이틀 라벨 내용 추가 + func setTitle(_ text: String) -> Self { + titleLabel.text = text + return self + } +} diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/CardList/CardListViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/CardList/CardListViewController.swift index 2e23ce9e..778f61a0 100644 --- a/NADA-iOS-forRelease/Sources/ViewControllers/CardList/CardListViewController.swift +++ b/NADA-iOS-forRelease/Sources/ViewControllers/CardList/CardListViewController.swift @@ -49,13 +49,13 @@ class CardListViewController: UIViewController { // MARK: - Functions func setCardList() { cardItems.append(contentsOf: [ - CardListDataModel(title: "SOPT 28기 명함", date: "2021/08/29"), - CardListDataModel(title: "SOPT 28기 명함", date: "2021/08/29"), - CardListDataModel(title: "SOPT 28기 명함", date: "2021/08/29"), - CardListDataModel(title: "SOPT 28기 명함", date: "2021/08/29"), - CardListDataModel(title: "SOPT 28기 명함", date: "2021/08/29"), - CardListDataModel(title: "SOPT 28기 명함", date: "2021/08/29"), - CardListDataModel(title: "SOPT 28기 명함", date: "2021/08/29") + CardListDataModel(title: "SOPT 28기 명함"), + CardListDataModel(title: "SOPT 28기 명함"), + CardListDataModel(title: "SOPT 28기 명함"), + CardListDataModel(title: "SOPT 28기 명함"), + CardListDataModel(title: "SOPT 28기 명함"), + CardListDataModel(title: "SOPT 28기 명함"), + CardListDataModel(title: "SOPT 28기 명함") ]) } @@ -90,7 +90,7 @@ class CardListViewController: UIViewController { // MARK: - UITableViewDelegate extension CardListViewController: UITableViewDelegate { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { - return 76 + return 58 } // Swipe Action @@ -179,8 +179,7 @@ extension CardListViewController: UITableViewDataSource { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { guard let serviceCell = tableView.dequeueReusableCell(withIdentifier: Const.Xib.cardListTableViewCell, for: indexPath) as? CardListTableViewCell else { return UITableViewCell() } - serviceCell.initData(title: cardItems[indexPath.row].title, - date: cardItems[indexPath.row].date) + serviceCell.initData(title: cardItems[indexPath.row].title) return serviceCell } diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/CustomTabBar/CustomTabBarController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/CustomTabBar/CustomTabBarController.swift deleted file mode 100644 index 204bb1ed..00000000 --- a/NADA-iOS-forRelease/Sources/ViewControllers/CustomTabBar/CustomTabBarController.swift +++ /dev/null @@ -1,169 +0,0 @@ -// -// CustomTabBarController.swift -// NADA-iOS-forRelease -// -// Created by 민 on 2021/10/09. -// - -import Foundation -import UIKit - -class CustomTabBarController: UITabBarController { - - // MARK: - Properties - @IBInspectable public var tintColor: UIColor? { - didSet { - customTabBar.tintColor = tintColor - customTabBar.reloadApperance() - } - } - - public let customTabBar: CustomTabBar = { - return CustomTabBar() - }() - - private(set) lazy var smallBottomView: UIView = { - let anotherSmallView = UIView() - anotherSmallView.backgroundColor = .clear - anotherSmallView.translatesAutoresizingMaskIntoConstraints = false - - return anotherSmallView - }() - - override open var selectedIndex: Int { - didSet { - customTabBar.select(at: selectedIndex, notifyDelegate: false) - } - } - - override open var selectedViewController: UIViewController? { - didSet { - customTabBar.select(at: selectedIndex, notifyDelegate: false) - } - } - - private var bottomSpacing: CGFloat = 5 - private var tabBarHeight: CGFloat = 70 - private var horizontleSpacing: CGFloat = 75 - - // MARK: - View Life Cycle - override open func viewDidLoad() { - super.viewDidLoad() - - self.additionalSafeAreaInsets = UIEdgeInsets(top: 0, left: 0, bottom: tabBarHeight + bottomSpacing, right: 0) - - self.tabBar.isHidden = true - - addAnotherSmallView() - setupTabBar() - - customTabBar.items = tabBar.items! - customTabBar.select(at: selectedIndex) - customTabBar.setGradient(color1: UIColor(red: 1, green: 1, blue: 1, alpha: 0.35), - color2: UIColor(red: 1, green: 1, blue: 1, alpha: 0.15)) - customTabBar.setBlur() - - NotificationCenter.default.addObserver(self, - selector: #selector(nextClickRecieved), - name: .deleteTabBar, - object: nil) - NotificationCenter.default.addObserver(self, - selector: #selector(prviousClickRecieved), - name: .expressTabBar, - object: nil) - } - - // MARK: - Functions - private func setTabBarHidden(_ isHidden: Bool, animated: Bool) { - let block = { - self.customTabBar.alpha = isHidden ? 0 : 1 - self.additionalSafeAreaInsets = isHidden ? .zero : UIEdgeInsets(top: 0, left: 0, bottom: self.tabBarHeight + self.bottomSpacing, right: 0) - } - - if animated { - UIView.animate(withDuration: 0.25, animations: block) - } else { - block() - } - } - - private func addAnotherSmallView() { - self.view.addSubview(smallBottomView) - - smallBottomView.bottomAnchor.constraint(equalTo: self.view.bottomAnchor).isActive = true - - let constraint: NSLayoutConstraint - - if #available(iOS 11.0, *) { - constraint = smallBottomView.topAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.bottomAnchor, constant: tabBarHeight) - } else { - constraint = smallBottomView.topAnchor.constraint(equalTo: self.view.layoutMarginsGuide.bottomAnchor, constant: tabBarHeight) - } - - constraint.priority = .defaultHigh - constraint.isActive = true - - smallBottomView.leadingAnchor.constraint(equalTo: view.leadingAnchor).isActive = true - smallBottomView.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true - } - - private func setupTabBar() { - customTabBar.delegate = self - self.view.addSubview(customTabBar) - - customTabBar.bottomAnchor.constraint(equalTo: smallBottomView.topAnchor, constant: 0).isActive = true - customTabBar.centerXAnchor.constraint(equalTo: self.view.centerXAnchor).isActive = true - customTabBar.leadingAnchor.constraint(equalTo: self.view.leadingAnchor, constant: horizontleSpacing).isActive = true - customTabBar.heightAnchor.constraint(equalToConstant: tabBarHeight).isActive = true - - self.view.bringSubviewToFront(customTabBar) - self.view.bringSubviewToFront(smallBottomView) - - customTabBar.tintColor = tintColor - } -} - -// MARK: - CardTabBarDelegate -extension CustomTabBarController: CardTabBarDelegate { - func cardTabBar(_ sender: CustomTabBar, didSelectItemAt index: Int) { - self.selectedIndex = index - } -} - -// MARK: - CustomTabBarController Extensions -extension CustomTabBarController { - // 탭바의 hidden 상태처리 함수 - @objc func nextClickRecieved() { - setTabBarHidden(true, animated: false) - } - - @objc func prviousClickRecieved() { - setTabBarHidden(false, animated: false) - } -} - -// MARK: - CustomTabBar Extensions -extension CustomTabBar { - // 그라데이션 효과 적용 - func setGradient(color1: UIColor, color2: UIColor) { - let gradient: CAGradientLayer = CAGradientLayer() - gradient.colors = [color1.cgColor, color2.cgColor] - gradient.locations = [0.0, 1.0] - gradient.startPoint = CGPoint(x: 0.5, y: 0.0) - gradient.endPoint = CGPoint(x: 0.5, y: 1.0) - gradient.frame = bounds - gradient.cornerRadius = 35 - layer.addSublayer(gradient) - } - - // Blur Effect 적용 - func setBlur() { - let blurEffect = UIBlurEffect(style: .light) - let blurEffectView = UIVisualEffectView(effect: blurEffect) - blurEffectView.frame = self.bounds - blurEffectView.layer.cornerRadius = 35 - blurEffectView.clipsToBounds = true - self.addSubview(blurEffectView) - self.sendSubviewToBack(blurEffectView) - } -} diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/Main/FrontViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/Main/FrontViewController.swift index ac7b896b..923fafe7 100644 --- a/NADA-iOS-forRelease/Sources/ViewControllers/Main/FrontViewController.swift +++ b/NADA-iOS-forRelease/Sources/ViewControllers/Main/FrontViewController.swift @@ -32,10 +32,9 @@ class FrontViewController: UIViewController { private var putSauceImageList = [String]() private var yangnyumImageList = [String]() private var friedImageList = [String]() - private var firstQuestionList = [String]() - private var firstAnswerList = [String]() - private var secondQuestionList = [String]() - private var secondAnswerList = [String]() + private var firstTmiList = [String]() + private var secondTmiList = [String]() + private var thirdTmiLabel = [String]() var isFrontCard: [Bool] = [true, true] @@ -68,6 +67,13 @@ class FrontViewController: UIViewController { } // MARK: - @IBAction Properties + // 명함 생성 뷰로 화면 전환 + @IBAction func presentToCardCreationView(_ sender: Any) { + let nextVC = UIStoryboard(name: Const.Storyboard.Name.cardCreation, bundle: nil).instantiateViewController(withIdentifier: Const.ViewController.Identifier.cardCreationViewController) + nextVC.modalPresentationStyle = .overFullScreen + self.present(nextVC, animated: true, completion: nil) + } + // 명함 리스트 뷰로 화면 전환 @IBAction func pushToCardListView(_ sender: Any) { let nextVC = UIStoryboard(name: Const.Storyboard.Name.cardList, bundle: nil).instantiateViewController(identifier: Const.ViewController.Identifier.cardListViewController) @@ -76,20 +82,13 @@ class FrontViewController: UIViewController { self.navigationController?.pushViewController(nextVC, animated: true) } - - // 명함 생성 뷰로 화면 전환 - @IBAction func presentToCardCreationView(_ sender: Any) { - let nextVC = UIStoryboard(name: Const.Storyboard.Name.cardCreation, bundle: nil).instantiateViewController(withIdentifier: Const.ViewController.Identifier.cardCreationViewController) - nextVC.modalPresentationStyle = .overFullScreen - self.present(nextVC, animated: true, completion: nil) - } } // MARK: - Extensions extension FrontViewController { private func setFrontList() { - imageList.append(contentsOf: ["bg1", - "bg1" + imageList.append(contentsOf: ["card", + "card" ]) cardNameList.append(contentsOf: ["SOPT 28기 명함", "SOPT 28기 명함" @@ -121,42 +120,39 @@ extension FrontViewController { } private func setBackList() { - mintImageList.append(contentsOf: ["opt1Select", - "opt1Select" + mintImageList.append(contentsOf: ["iconTasteOnMincho", + "iconTasteOnMincho" ]) - noMintImageList.append(contentsOf: ["opt2Unselect", - "opt2Unselect" + noMintImageList.append(contentsOf: ["iconTasteOffBanmincho", + "iconTasteOffBanmincho" ]) - sojuImageList.append(contentsOf: ["opt3Unselect", - "opt3Unselect" + sojuImageList.append(contentsOf: ["iconTasteOnSoju", + "iconTasteOnSoju" ]) - beerImageList.append(contentsOf: ["opt4Select", - "opt4Select" + beerImageList.append(contentsOf: ["iconTasteOffBeer", + "iconTasteOffBeer" ]) - pourImageList.append(contentsOf: ["opt5Unselect", - "opt5Unselect" + pourImageList.append(contentsOf: ["iconTasteOffBumeok", + "iconTasteOffBumeok" ]) - putSauceImageList.append(contentsOf: ["opt6Select", - "opt6Select" + putSauceImageList.append(contentsOf: ["iconTasteOnZzik", + "iconTasteOnZzik" ]) - yangnyumImageList.append(contentsOf: ["opt7Select", - "opt7Select" + yangnyumImageList.append(contentsOf: ["iconTasteOffSeasoned", + "iconTasteOffSeasoned" ]) - friedImageList.append(contentsOf: ["opt8Unselect", - "opt8Unselect" + friedImageList.append(contentsOf: ["iconTasteOnFried", + "iconTasteOnFried" ]) - firstQuestionList.append(contentsOf: ["Q1. 직접 질문 추가", - "" - ]) - firstAnswerList.append(contentsOf: ["질문에 대한 대답입니다.", - "" - ]) - secondQuestionList.append(contentsOf: ["Q2. 직접 질문 추가", - "" - ]) - secondAnswerList.append(contentsOf: ["질문에 대한 대답입니다.", - "" - ]) + firstTmiList.append(contentsOf: ["첫번째", + "첫번째" + ]) + secondTmiList.append(contentsOf: ["두번째리따리따", + "두번째" + ]) + thirdTmiLabel.append(contentsOf: ["세번째리따라라ㅏㄹ", + "세번째" + ]) } } @@ -196,7 +192,7 @@ extension FrontViewController: VerticalCardSwiperDatasource { guard let backCell = verticalCardSwiperView.dequeueReusableCell(withReuseIdentifier: "BackCardCell", for: index) as? BackCardCell else { return CardCell() } - backCell.initCell(imageList[index], mintImageList[index], noMintImageList[index], sojuImageList[index], beerImageList[index], pourImageList[index], putSauceImageList[index], yangnyumImageList[index], friedImageList[index], firstQuestionList[index], firstAnswerList[index], secondQuestionList[index], secondAnswerList[index]) + backCell.initCell(imageList[index], mintImageList[index], noMintImageList[index], sojuImageList[index], beerImageList[index], pourImageList[index], putSauceImageList[index], yangnyumImageList[index], friedImageList[index], firstTmiList[index], secondTmiList[index], thirdTmiLabel[index]) return backCell } } diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/More/MoreViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/More/MoreViewController.swift new file mode 100644 index 00000000..e3dfcc8e --- /dev/null +++ b/NADA-iOS-forRelease/Sources/ViewControllers/More/MoreViewController.swift @@ -0,0 +1,29 @@ +// +// MoreViewController.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/11/18. +// + +import UIKit + +class MoreViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + + /* + // MARK: - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + // Get the new view controller using segue.destination. + // Pass the selected object to the new view controller. + } + */ + +} diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/TabBar/TabBarViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/TabBar/TabBarViewController.swift new file mode 100644 index 00000000..623feeea --- /dev/null +++ b/NADA-iOS-forRelease/Sources/ViewControllers/TabBar/TabBarViewController.swift @@ -0,0 +1,19 @@ +// +// TabBarViewController.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/11/18. +// + +import UIKit + +class TabBarViewController: UITabBarController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + +} + diff --git a/NADA-iOS-forRelease/Sources/Views/CustomTabBar/CustomTabBar.swift b/NADA-iOS-forRelease/Sources/Views/CustomTabBar/CustomTabBar.swift deleted file mode 100644 index 2505baf2..00000000 --- a/NADA-iOS-forRelease/Sources/Views/CustomTabBar/CustomTabBar.swift +++ /dev/null @@ -1,202 +0,0 @@ -// -// CustomTabBar.swift -// NADA-iOS-forRelease -// -// Created by 민 on 2021/10/09. -// - -import Foundation -import UIKit - -protocol CardTabBarDelegate: AnyObject { - func cardTabBar(_ sender: CustomTabBar, didSelectItemAt index: Int) -} - -open class CustomTabBar: UIView { - - weak var delegate: CardTabBarDelegate? - - var items: [UITabBarItem] = [] { - didSet { - reloadViews() - } - } - - override open func tintColorDidChange() { - super.tintColorDidChange() - reloadApperance() - } - - func reloadApperance() { - - buttons().forEach { button in - button.selectedColor = tintColor - } - indicatorView.tintColor = tintColor - } - - lazy var stackView: UIStackView = { - let stackView = UIStackView(arrangedSubviews: []) - stackView.axis = .horizontal - stackView.distribution = .fillEqually - stackView.alignment = .center - - return stackView - }() - - lazy var indicatorView: CustomTabIndicatorView = { - let view = CustomTabIndicatorView() - view.translatesAutoresizingMaskIntoConstraints = false - prepareForAutoLayout() - view.constraint(width: 5) - view.backgroundColor = tintColor - view.makeWidthEqualHeight() - - return view - }() - - private var indicatorViewYConstraint: NSLayoutConstraint! - private var indicatorViewXConstraint: NSLayoutConstraint! - - override init(frame: CGRect) { - super.init(frame: frame) - setup() - } - - required public init?(coder aDecoder: NSCoder) { - super.init(coder: aDecoder) - setup() - } - - deinit { - stackView.arrangedSubviews.forEach { - if let button = $0 as? UIControl { - button.removeTarget(self, action: #selector(buttonTapped(sender:)), for: .touchUpInside) - } - } - } - - private func setup() { - translatesAutoresizingMaskIntoConstraints = false - - addSubview(stackView) - addSubview(indicatorView) - - indicatorViewYConstraint?.isActive = false - indicatorViewYConstraint = indicatorView.topAnchor.constraint(equalTo: stackView.bottomAnchor, constant: -10.5) - indicatorViewYConstraint.isActive = true - - tintColorDidChange() - } - - func add(item: UITabBarItem) { - self.items.append(item) - self.addButton(with: item.image!) - } - - func remove(item: UITabBarItem) { - if let index = self.items.firstIndex(of: item) { - self.items.remove(at: index) - let view = self.stackView.arrangedSubviews[index] - self.stackView.removeArrangedSubview(view) - } - } - - private func addButton(with image: UIImage) { - let button = CustomTabBarButton(image: image) - button.translatesAutoresizingMaskIntoConstraints = false - button.selectedColor = tintColor - - button.addTarget(self, action: #selector(buttonTapped(sender:)), for: .touchUpInside) - self.stackView.addArrangedSubview(button) - } - - func select(at index: Int, notifyDelegate: Bool = true) { - for (bIndex, view) in stackView.arrangedSubviews.enumerated() { - if let button = view as? UIButton { - button.tintColor = bIndex == index ? tintColor : UIColor.white - } - } - - if notifyDelegate { - self.delegate?.cardTabBar(self, didSelectItemAt: index) - } - } - - func reloadViews() { - indicatorViewYConstraint?.isActive = false - indicatorViewYConstraint = indicatorView.topAnchor.constraint(equalTo: stackView.bottomAnchor, constant: -10.5) - indicatorViewYConstraint.isActive = true - - for button in (stackView.arrangedSubviews.compactMap { $0 as? CustomTabBarButton }) { - stackView.removeArrangedSubview(button) - button.removeFromSuperview() - button.removeTarget(self, action: nil, for: .touchUpInside) - } - - for item in items { - if let image = item.image { - addButton(with: image) - } else { - addButton(with: UIImage()) - } - } - - select(at: 0) - } - - private func buttons() -> [CustomTabBarButton] { - return stackView.arrangedSubviews.compactMap { $0 as? CustomTabBarButton } - } - - func select(at index: Int) { - /* move the indicator view */ - if indicatorViewXConstraint != nil { - indicatorViewXConstraint.isActive = false - indicatorViewXConstraint = nil - } - - for (bIndex, button) in buttons().enumerated() { - button.selectedColor = tintColor - button.isSelected = bIndex == index - - if bIndex == index { - indicatorViewXConstraint = indicatorView.centerXAnchor.constraint(equalTo: button.centerXAnchor) - indicatorViewXConstraint.isActive = true - } - } - - UIView.animate(withDuration: 0.25) { - self.layoutIfNeeded() - } - self.delegate?.cardTabBar(self, didSelectItemAt: index) - } - - @objc func buttonTapped(sender: CustomTabBarButton) { - if let index = stackView.arrangedSubviews.firstIndex(of: sender) { - select(at: index) - } - } - - override open func touchesEnded(_ touches: Set, with event: UIEvent?) { - guard let position = touches.first?.location(in: self) else { - super.touchesEnded(touches, with: event) - return - } - - let buttons = self.stackView.arrangedSubviews.compactMap { $0 as? CustomTabBarButton }.filter { !$0.isHidden } - let distances = buttons.map { $0.center.distance(to: position) } - - let buttonsDistances = zip(buttons, distances) - - if let closestButton = buttonsDistances.min(by: { $0.1 < $1.1 }) { - buttonTapped(sender: closestButton.0) - } - } - - override open func layoutSubviews() { - super.layoutSubviews() - stackView.frame = bounds.inset(by: UIEdgeInsets(top: 0, left: 0, bottom: 8, right: 0)) - layer.cornerRadius = bounds.height / 2 - } -} diff --git a/NADA-iOS-forRelease/Sources/Views/CustomTabBar/CustomTabBarButton.swift b/NADA-iOS-forRelease/Sources/Views/CustomTabBar/CustomTabBarButton.swift deleted file mode 100644 index d4ef311b..00000000 --- a/NADA-iOS-forRelease/Sources/Views/CustomTabBar/CustomTabBarButton.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// CustomTabBarButton.swift -// NADA-iOS-forRelease -// -// Created by 민 on 2021/10/09. -// - -import Foundation -import UIKit - -public class CustomTabBarButton: UIButton { - - var selectedColor: UIColor! = .white { - didSet { - reloadApperance() - } - } - - var unselectedColor: UIColor! = .white { - didSet { - reloadApperance() - } - } - - init(forItem item: UITabBarItem) { - super.init(frame: .zero) - setImage(item.image, for: .normal) - } - - init(image: UIImage) { - super.init(frame: .zero) - setImage(image, for: .normal) - } - - required init?(coder aDecoder: NSCoder) { - super.init(coder: aDecoder) - } - - override public var isSelected: Bool { - didSet { - reloadApperance() - } - } - - func reloadApperance() { - self.tintColor = isSelected ? selectedColor : unselectedColor - } -} diff --git a/NADA-iOS-forRelease/Sources/Views/CustomTabBar/CustomTabIndicatorView.swift b/NADA-iOS-forRelease/Sources/Views/CustomTabBar/CustomTabIndicatorView.swift deleted file mode 100644 index 4c5af65c..00000000 --- a/NADA-iOS-forRelease/Sources/Views/CustomTabBar/CustomTabIndicatorView.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// CustomTabIndicatorView.swift -// NADA-iOS-forRelease -// -// Created by 민 on 2021/10/09. -// - -import Foundation -import UIKit - -open class CustomTabIndicatorView: UIView { - override open func layoutSubviews() { - super.layoutSubviews() - self.layer.cornerRadius = self.bounds.height / 2 - } - - override open func tintColorDidChange() { - super.tintColorDidChange() - self.backgroundColor = tintColor - } -}