diff --git a/SQManagement/SQManagement.xcodeproj/project.pbxproj b/SQManagement/SQManagement.xcodeproj/project.pbxproj index b932dbb3..37aa1577 100644 --- a/SQManagement/SQManagement.xcodeproj/project.pbxproj +++ b/SQManagement/SQManagement.xcodeproj/project.pbxproj @@ -9,21 +9,20 @@ /* Begin PBXBuildFile section */ 14040349233F887300D0BC12 /* SQTabBarController.m in Sources */ = {isa = PBXBuildFile; fileRef = 14040347233F887200D0BC12 /* SQTabBarController.m */; }; 1404034A233F887300D0BC12 /* SQTabbarControllerAnimatedTransitioning.m in Sources */ = {isa = PBXBuildFile; fileRef = 14040348233F887200D0BC12 /* SQTabbarControllerAnimatedTransitioning.m */; }; - 140BBD162340550F0077E130 /* SQProjectTimeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 140BBD152340550F0077E130 /* SQProjectTimeViewController.m */; }; - 140BBD19234059E30077E130 /* SQProjectTimeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 140BBD18234059E30077E130 /* SQProjectTimeView.m */; }; - 140BBD1B23405A390077E130 /* SQProjectTimeView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 140BBD1A23405A390077E130 /* SQProjectTimeView.xib */; }; + 140BBD162340550F0077E130 /* SQTimeEventsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 140BBD152340550F0077E130 /* SQTimeEventsViewController.m */; }; + 140BBD1E23408AED0077E130 /* SQConnectionEventsViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 140BBD1D23408AED0077E130 /* SQConnectionEventsViewController.storyboard */; }; 14233205233F923700D4FA3B /* SQConnectionModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 14233204233F923700D4FA3B /* SQConnectionModel.m */; }; 142787F3233CB4AB0000FEBB /* SQTimeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 142787F2233CB4AB0000FEBB /* SQTimeViewController.m */; }; 142787F6233CBC1F0000FEBB /* SQEnergyViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 142787F5233CBC1F0000FEBB /* SQEnergyViewController.m */; }; 142787FC233CBC980000FEBB /* SQH1TitleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 142787FB233CBC980000FEBB /* SQH1TitleViewController.m */; }; - 149AC8852339B92F009C88AB /* SQAddConnectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 149AC8842339B92F009C88AB /* SQAddConnectionViewController.m */; }; + 149AC8852339B92F009C88AB /* SQConnectionEventsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 149AC8842339B92F009C88AB /* SQConnectionEventsViewController.m */; }; 149AC8882339BEE6009C88AB /* SQProfileHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 149AC8872339BEE6009C88AB /* SQProfileHeaderView.m */; }; 149AC88A2339BEF1009C88AB /* SQProfileHeaderView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 149AC8892339BEF1009C88AB /* SQProfileHeaderView.xib */; }; 149AC88E2339C146009C88AB /* SQConnectionPropertyCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 149AC88C2339C146009C88AB /* SQConnectionPropertyCell.m */; }; 149AC88F2339C146009C88AB /* SQConnectionPropertyCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 149AC88D2339C146009C88AB /* SQConnectionPropertyCell.xib */; }; 149AC8982339F7D4009C88AB /* SQSearchInputView.m in Sources */ = {isa = PBXBuildFile; fileRef = 149AC8962339F7D4009C88AB /* SQSearchInputView.m */; }; 149AC8992339F7D4009C88AB /* SQSearchInputView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 149AC8972339F7D4009C88AB /* SQSearchInputView.xib */; }; - 14D633B0233763FF004FD86A /* SQAuthorizationManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D633AF233763FF004FD86A /* SQAuthorizationManager.m */; }; + 14D633B0233763FF004FD86A /* SQAuthorizationTool.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D633AF233763FF004FD86A /* SQAuthorizationTool.m */; }; 14DC37CB23374CFB00867A92 /* SQH1TitleView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 14DC37C923374CFB00867A92 /* SQH1TitleView.xib */; }; 14DC37CC23374CFB00867A92 /* SQH1TitleView.m in Sources */ = {isa = PBXBuildFile; fileRef = 14DC37CA23374CFB00867A92 /* SQH1TitleView.m */; }; 14DC37CF23374DC600867A92 /* SQConnectionsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 14DC37CE23374DC600867A92 /* SQConnectionsViewController.m */; }; @@ -48,11 +47,9 @@ 14040346233F887200D0BC12 /* SQTabbarControllerAnimatedTransitioning.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SQTabbarControllerAnimatedTransitioning.h; sourceTree = ""; }; 14040347233F887200D0BC12 /* SQTabBarController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SQTabBarController.m; sourceTree = ""; }; 14040348233F887200D0BC12 /* SQTabbarControllerAnimatedTransitioning.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SQTabbarControllerAnimatedTransitioning.m; sourceTree = ""; }; - 140BBD142340550F0077E130 /* SQProjectTimeViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SQProjectTimeViewController.h; sourceTree = ""; }; - 140BBD152340550F0077E130 /* SQProjectTimeViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SQProjectTimeViewController.m; sourceTree = ""; }; - 140BBD17234059E30077E130 /* SQProjectTimeView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SQProjectTimeView.h; sourceTree = ""; }; - 140BBD18234059E30077E130 /* SQProjectTimeView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SQProjectTimeView.m; sourceTree = ""; }; - 140BBD1A23405A390077E130 /* SQProjectTimeView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SQProjectTimeView.xib; sourceTree = ""; }; + 140BBD142340550F0077E130 /* SQTimeEventsViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SQTimeEventsViewController.h; sourceTree = ""; }; + 140BBD152340550F0077E130 /* SQTimeEventsViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SQTimeEventsViewController.m; sourceTree = ""; }; + 140BBD1D23408AED0077E130 /* SQConnectionEventsViewController.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = SQConnectionEventsViewController.storyboard; sourceTree = ""; }; 14233203233F923700D4FA3B /* SQConnectionModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SQConnectionModel.h; sourceTree = ""; }; 14233204233F923700D4FA3B /* SQConnectionModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SQConnectionModel.m; sourceTree = ""; }; 142787F1233CB4AB0000FEBB /* SQTimeViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SQTimeViewController.h; sourceTree = ""; }; @@ -61,8 +58,8 @@ 142787F5233CBC1F0000FEBB /* SQEnergyViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SQEnergyViewController.m; sourceTree = ""; }; 142787FA233CBC980000FEBB /* SQH1TitleViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SQH1TitleViewController.h; sourceTree = ""; }; 142787FB233CBC980000FEBB /* SQH1TitleViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SQH1TitleViewController.m; sourceTree = ""; }; - 149AC8832339B92F009C88AB /* SQAddConnectionViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SQAddConnectionViewController.h; sourceTree = ""; }; - 149AC8842339B92F009C88AB /* SQAddConnectionViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SQAddConnectionViewController.m; sourceTree = ""; }; + 149AC8832339B92F009C88AB /* SQConnectionEventsViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SQConnectionEventsViewController.h; sourceTree = ""; }; + 149AC8842339B92F009C88AB /* SQConnectionEventsViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SQConnectionEventsViewController.m; sourceTree = ""; }; 149AC8862339BEE6009C88AB /* SQProfileHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SQProfileHeaderView.h; sourceTree = ""; }; 149AC8872339BEE6009C88AB /* SQProfileHeaderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SQProfileHeaderView.m; sourceTree = ""; }; 149AC8892339BEF1009C88AB /* SQProfileHeaderView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SQProfileHeaderView.xib; sourceTree = ""; }; @@ -72,8 +69,8 @@ 149AC8952339F7D4009C88AB /* SQSearchInputView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SQSearchInputView.h; sourceTree = ""; }; 149AC8962339F7D4009C88AB /* SQSearchInputView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SQSearchInputView.m; sourceTree = ""; }; 149AC8972339F7D4009C88AB /* SQSearchInputView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SQSearchInputView.xib; sourceTree = ""; }; - 14D633AE233763FF004FD86A /* SQAuthorizationManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SQAuthorizationManager.h; sourceTree = ""; }; - 14D633AF233763FF004FD86A /* SQAuthorizationManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SQAuthorizationManager.m; sourceTree = ""; }; + 14D633AE233763FF004FD86A /* SQAuthorizationTool.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SQAuthorizationTool.h; sourceTree = ""; }; + 14D633AF233763FF004FD86A /* SQAuthorizationTool.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SQAuthorizationTool.m; sourceTree = ""; }; 14DC37C823374CFB00867A92 /* SQH1TitleView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SQH1TitleView.h; sourceTree = ""; }; 14DC37C923374CFB00867A92 /* SQH1TitleView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SQH1TitleView.xib; sourceTree = ""; }; 14DC37CA23374CFB00867A92 /* SQH1TitleView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SQH1TitleView.m; sourceTree = ""; }; @@ -119,20 +116,48 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 14233206233F923C00D4FA3B /* Model */ = { + 140BBD1F23408B660077E130 /* Connections */ = { isa = PBXGroup; children = ( 14233203233F923700D4FA3B /* SQConnectionModel.h */, 14233204233F923700D4FA3B /* SQConnectionModel.m */, + 149AC88B2339C146009C88AB /* SQConnectionPropertyCell.h */, + 149AC88C2339C146009C88AB /* SQConnectionPropertyCell.m */, + 149AC88D2339C146009C88AB /* SQConnectionPropertyCell.xib */, + 14DC37CD23374DC600867A92 /* SQConnectionsViewController.h */, + 14DC37CE23374DC600867A92 /* SQConnectionsViewController.m */, + 149AC8832339B92F009C88AB /* SQConnectionEventsViewController.h */, + 149AC8842339B92F009C88AB /* SQConnectionEventsViewController.m */, + 140BBD1D23408AED0077E130 /* SQConnectionEventsViewController.storyboard */, ); - path = Model; + path = Connections; + sourceTree = ""; + }; + 14CA7F0723408C6A00910428 /* Time */ = { + isa = PBXGroup; + children = ( + 142787F1233CB4AB0000FEBB /* SQTimeViewController.h */, + 142787F2233CB4AB0000FEBB /* SQTimeViewController.m */, + 140BBD142340550F0077E130 /* SQTimeEventsViewController.h */, + 140BBD152340550F0077E130 /* SQTimeEventsViewController.m */, + ); + path = Time; + sourceTree = ""; + }; + 14CA7F0823408C7E00910428 /* Energy */ = { + isa = PBXGroup; + children = ( + 142787F4233CBC1F0000FEBB /* SQEnergyViewController.h */, + 142787F5233CBC1F0000FEBB /* SQEnergyViewController.m */, + ); + path = Energy; sourceTree = ""; }; 14D633B123376549004FD86A /* Tools */ = { isa = PBXGroup; children = ( - 14D633AE233763FF004FD86A /* SQAuthorizationManager.h */, - 14D633AF233763FF004FD86A /* SQAuthorizationManager.m */, + 14D633AE233763FF004FD86A /* SQAuthorizationTool.h */, + 14D633AF233763FF004FD86A /* SQAuthorizationTool.m */, ); path = Tools; sourceTree = ""; @@ -140,21 +165,8 @@ 14DC37D023374F6E00867A92 /* Coms */ = { isa = PBXGroup; children = ( - 149AC8952339F7D4009C88AB /* SQSearchInputView.h */, - 149AC8962339F7D4009C88AB /* SQSearchInputView.m */, - 149AC8972339F7D4009C88AB /* SQSearchInputView.xib */, - 14DC37C823374CFB00867A92 /* SQH1TitleView.h */, - 14DC37CA23374CFB00867A92 /* SQH1TitleView.m */, - 14DC37C923374CFB00867A92 /* SQH1TitleView.xib */, - 149AC8862339BEE6009C88AB /* SQProfileHeaderView.h */, - 149AC8872339BEE6009C88AB /* SQProfileHeaderView.m */, - 149AC8892339BEF1009C88AB /* SQProfileHeaderView.xib */, - 149AC88B2339C146009C88AB /* SQConnectionPropertyCell.h */, - 149AC88C2339C146009C88AB /* SQConnectionPropertyCell.m */, - 149AC88D2339C146009C88AB /* SQConnectionPropertyCell.xib */, - 140BBD17234059E30077E130 /* SQProjectTimeView.h */, - 140BBD18234059E30077E130 /* SQProjectTimeView.m */, - 140BBD1A23405A390077E130 /* SQProjectTimeView.xib */, + 142787FA233CBC980000FEBB /* SQH1TitleViewController.h */, + 142787FB233CBC980000FEBB /* SQH1TitleViewController.m */, ); path = Coms; sourceTree = ""; @@ -172,8 +184,6 @@ 14040347233F887200D0BC12 /* SQTabBarController.m */, 14040346233F887200D0BC12 /* SQTabbarControllerAnimatedTransitioning.h */, 14040348233F887200D0BC12 /* SQTabbarControllerAnimatedTransitioning.m */, - 142787FA233CBC980000FEBB /* SQH1TitleViewController.h */, - 142787FB233CBC980000FEBB /* SQH1TitleViewController.m */, ); path = Main; sourceTree = ""; @@ -198,16 +208,15 @@ 14DC37E423374FC300867A92 /* UI */ = { isa = PBXGroup; children = ( - 142787F1233CB4AB0000FEBB /* SQTimeViewController.h */, - 142787F2233CB4AB0000FEBB /* SQTimeViewController.m */, - 140BBD142340550F0077E130 /* SQProjectTimeViewController.h */, - 140BBD152340550F0077E130 /* SQProjectTimeViewController.m */, - 142787F4233CBC1F0000FEBB /* SQEnergyViewController.h */, - 142787F5233CBC1F0000FEBB /* SQEnergyViewController.m */, - 14DC37CD23374DC600867A92 /* SQConnectionsViewController.h */, - 14DC37CE23374DC600867A92 /* SQConnectionsViewController.m */, - 149AC8832339B92F009C88AB /* SQAddConnectionViewController.h */, - 149AC8842339B92F009C88AB /* SQAddConnectionViewController.m */, + 149AC8952339F7D4009C88AB /* SQSearchInputView.h */, + 149AC8962339F7D4009C88AB /* SQSearchInputView.m */, + 149AC8972339F7D4009C88AB /* SQSearchInputView.xib */, + 14DC37C823374CFB00867A92 /* SQH1TitleView.h */, + 14DC37CA23374CFB00867A92 /* SQH1TitleView.m */, + 14DC37C923374CFB00867A92 /* SQH1TitleView.xib */, + 149AC8862339BEE6009C88AB /* SQProfileHeaderView.h */, + 149AC8872339BEE6009C88AB /* SQProfileHeaderView.m */, + 149AC8892339BEF1009C88AB /* SQProfileHeaderView.xib */, ); path = UI; sourceTree = ""; @@ -236,8 +245,10 @@ 14DC37D123374F7700867A92 /* Main */, 14DC37D023374F6E00867A92 /* Coms */, 14D633B123376549004FD86A /* Tools */, - 14233206233F923C00D4FA3B /* Model */, 14DC37E423374FC300867A92 /* UI */, + 140BBD1F23408B660077E130 /* Connections */, + 14CA7F0723408C6A00910428 /* Time */, + 14CA7F0823408C7E00910428 /* Energy */, 14DC37D423374FA500867A92 /* SQExtension */, 14E97DCE2335014B004FC20D /* Main.storyboard */, 14E97DD42335014C004FC20D /* Assets.xcassets */, @@ -326,8 +337,8 @@ files = ( 149AC8992339F7D4009C88AB /* SQSearchInputView.xib in Resources */, 14DC37CB23374CFB00867A92 /* SQH1TitleView.xib in Resources */, + 140BBD1E23408AED0077E130 /* SQConnectionEventsViewController.storyboard in Resources */, 14E97DD82335014C004FC20D /* LaunchScreen.storyboard in Resources */, - 140BBD1B23405A390077E130 /* SQProjectTimeView.xib in Resources */, 14E97DD52335014C004FC20D /* Assets.xcassets in Resources */, 14E97DD02335014B004FC20D /* Main.storyboard in Resources */, 149AC88A2339BEF1009C88AB /* SQProfileHeaderView.xib in Resources */, @@ -368,7 +379,7 @@ buildActionMask = 2147483647; files = ( 14DC37E123374FA500867A92 /* UIView+SQExtension.m in Sources */, - 140BBD162340550F0077E130 /* SQProjectTimeViewController.m in Sources */, + 140BBD162340550F0077E130 /* SQTimeEventsViewController.m in Sources */, 14E97DDB2335014C004FC20D /* main.m in Sources */, 14DC37E323374FA500867A92 /* UIColor+SQExtension.m in Sources */, 14DC37E72337509E00867A92 /* SQNavigationController.m in Sources */, @@ -379,16 +390,15 @@ 14DC37CC23374CFB00867A92 /* SQH1TitleView.m in Sources */, 149AC8982339F7D4009C88AB /* SQSearchInputView.m in Sources */, 14040349233F887300D0BC12 /* SQTabBarController.m in Sources */, - 14D633B0233763FF004FD86A /* SQAuthorizationManager.m in Sources */, + 14D633B0233763FF004FD86A /* SQAuthorizationTool.m in Sources */, 14233205233F923700D4FA3B /* SQConnectionModel.m in Sources */, 142787F6233CBC1F0000FEBB /* SQEnergyViewController.m in Sources */, 142787F3233CB4AB0000FEBB /* SQTimeViewController.m in Sources */, 149AC8882339BEE6009C88AB /* SQProfileHeaderView.m in Sources */, - 140BBD19234059E30077E130 /* SQProjectTimeView.m in Sources */, 14DC37E023374FA500867A92 /* NSObject+SQExtension.m in Sources */, 1404034A233F887300D0BC12 /* SQTabbarControllerAnimatedTransitioning.m in Sources */, 14DC37CF23374DC600867A92 /* SQConnectionsViewController.m in Sources */, - 149AC8852339B92F009C88AB /* SQAddConnectionViewController.m in Sources */, + 149AC8852339B92F009C88AB /* SQConnectionEventsViewController.m in Sources */, 14E97DCA2335014B004FC20D /* SceneDelegate.m in Sources */, 142787FC233CBC980000FEBB /* SQH1TitleViewController.m in Sources */, 14DC37E223374FA500867A92 /* UIImage+SQExtension.m in Sources */, diff --git a/SQManagement/SQManagement/Base.lproj/ConnectionEventsViewController~.storyboard b/SQManagement/SQManagement/Base.lproj/ConnectionEventsViewController~.storyboard new file mode 100644 index 00000000..3bb1cd24 --- /dev/null +++ b/SQManagement/SQManagement/Base.lproj/ConnectionEventsViewController~.storyboard @@ -0,0 +1,242 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SQManagement/SQManagement/Base.lproj/Main.storyboard b/SQManagement/SQManagement/Base.lproj/Main.storyboard index 3dc95c67..c6970ed3 100644 --- a/SQManagement/SQManagement/Base.lproj/Main.storyboard +++ b/SQManagement/SQManagement/Base.lproj/Main.storyboard @@ -1,5 +1,5 @@ - + @@ -51,37 +51,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -93,7 +62,7 @@ - + @@ -133,7 +102,6 @@ - @@ -220,11 +188,11 @@ - + - - + + @@ -239,5 +207,15 @@ + + + + + + + + + + diff --git a/SQManagement/SQManagement/Main/SQH1TitleViewController.h b/SQManagement/SQManagement/Coms/SQH1TitleViewController.h similarity index 100% rename from SQManagement/SQManagement/Main/SQH1TitleViewController.h rename to SQManagement/SQManagement/Coms/SQH1TitleViewController.h diff --git a/SQManagement/SQManagement/Main/SQH1TitleViewController.m b/SQManagement/SQManagement/Coms/SQH1TitleViewController.m similarity index 100% rename from SQManagement/SQManagement/Main/SQH1TitleViewController.m rename to SQManagement/SQManagement/Coms/SQH1TitleViewController.m diff --git a/SQManagement/SQManagement/Coms/SQProjectTimeView.h b/SQManagement/SQManagement/Coms/SQProjectTimeView.h deleted file mode 100644 index 688b1ff7..00000000 --- a/SQManagement/SQManagement/Coms/SQProjectTimeView.h +++ /dev/null @@ -1,17 +0,0 @@ -// -// SQProjectTimeView.h -// SQManagement -// -// Created by 朱双泉 on 2019/9/29. -// Copyright © 2019 Castie!. All rights reserved. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface SQProjectTimeView : UIView - -@end - -NS_ASSUME_NONNULL_END diff --git a/SQManagement/SQManagement/Coms/SQProjectTimeView.m b/SQManagement/SQManagement/Coms/SQProjectTimeView.m deleted file mode 100644 index 6da7dd44..00000000 --- a/SQManagement/SQManagement/Coms/SQProjectTimeView.m +++ /dev/null @@ -1,21 +0,0 @@ -// -// SQProjectTimeView.m -// SQManagement -// -// Created by 朱双泉 on 2019/9/29. -// Copyright © 2019 Castie!. All rights reserved. -// - -#import "SQProjectTimeView.h" - -@implementation SQProjectTimeView - -/* -// Only override drawRect: if you perform custom drawing. -// An empty implementation adversely affects performance during animation. -- (void)drawRect:(CGRect)rect { - // Drawing code -} -*/ - -@end diff --git a/SQManagement/SQManagement/Coms/SQProjectTimeView.xib b/SQManagement/SQManagement/Coms/SQProjectTimeView.xib deleted file mode 100644 index f5f7391d..00000000 --- a/SQManagement/SQManagement/Coms/SQProjectTimeView.xib +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/SQManagement/SQManagement/UI/SQAddConnectionViewController.h b/SQManagement/SQManagement/Connections/SQConnectionEventsViewController.h similarity index 60% rename from SQManagement/SQManagement/UI/SQAddConnectionViewController.h rename to SQManagement/SQManagement/Connections/SQConnectionEventsViewController.h index e6a23889..7ce1fdbf 100644 --- a/SQManagement/SQManagement/UI/SQAddConnectionViewController.h +++ b/SQManagement/SQManagement/Connections/SQConnectionEventsViewController.h @@ -10,7 +10,11 @@ NS_ASSUME_NONNULL_BEGIN -@interface SQAddConnectionViewController : UITableViewController +@class SQConnectionModel; + +@interface SQConnectionEventsViewController : UITableViewController + +@property (nonatomic, strong) SQConnectionModel *connection; @end diff --git a/SQManagement/SQManagement/UI/SQAddConnectionViewController.m b/SQManagement/SQManagement/Connections/SQConnectionEventsViewController.m similarity index 90% rename from SQManagement/SQManagement/UI/SQAddConnectionViewController.m rename to SQManagement/SQManagement/Connections/SQConnectionEventsViewController.m index a4de1340..5c0c8222 100644 --- a/SQManagement/SQManagement/UI/SQAddConnectionViewController.m +++ b/SQManagement/SQManagement/Connections/SQConnectionEventsViewController.m @@ -6,30 +6,33 @@ // Copyright © 2019 Castie!. All rights reserved. // -#import "SQAddConnectionViewController.h" +#import "SQConnectionEventsViewController.h" #import "SQProfileHeaderView.h" #import "SQConnectionPropertyCell.h" #import "UIColor+SQExtension.h" #import "UIView+SQExtension.h" #import "SQConnectionModel.h" -@interface SQAddConnectionViewController () +@interface SQConnectionEventsViewController () @property (nonatomic, strong) NSArray *dataSource; @property (nonatomic, strong) SQProfileHeaderView *headerView; -@property (nonatomic, strong) SQConnectionModel *connection; @end -@implementation SQAddConnectionViewController +@implementation SQConnectionEventsViewController - (void)viewDidLoad { [super viewDidLoad]; - self.title = @"新增人脉"; + if (!self.connection) { + self.title = @"新增人脉"; + self.connection = [SQConnectionModel new]; + } else { + self.title = self.connection.name; + } self.dataSource = @[ @[@"姓名", @"角色", @"职业", @"地区", @"行业", @"影响力", @"亲密程度", @"黄金人脉圈"], @[@"联系方式", @"社交记录"], @[@"特征", @"工作", @"爱好", @"特殊细节", @"给我的启发"], ]; - self.connection = [SQConnectionModel new]; self.tableView.backgroundColor = [UIColor colorWithHexString:@"f8f8f8"]; [self.tableView registerNib:[UINib nibWithNibName:NSStringFromClass([SQConnectionPropertyCell class]) bundle:nil] forCellReuseIdentifier:NSStringFromClass([SQConnectionPropertyCell class])]; self.headerView = [SQProfileHeaderView headerView]; @@ -70,7 +73,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N SQConnectionPropertyCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([SQConnectionPropertyCell class])]; cell.titleLabel.text = self.dataSource[indexPath.section][indexPath.row]; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; - [self.connection map:indexPath.row bind:cell.inputLabel]; + if (indexPath.section == 0) { + [self.connection map:indexPath.row bind:cell.inputLabel]; + } return cell; } @@ -104,14 +109,6 @@ - (void)imagePickerController:(UIImagePickerController *)picker didFinishPicking self.headerView.profileImageView.image = [info objectForKey:UIImagePickerControllerOriginalImage]; } -- (IBAction)doneButtonClick:(UIBarButtonItem *)sender { - [self dismiss]; -} - -- (IBAction)cancelButtonClick:(UIBarButtonItem *)sender { - [self dismiss]; -} - - (void)dismiss { [self dismissViewControllerAnimated:YES completion:nil]; } diff --git a/SQManagement/SQManagement/Connections/SQConnectionEventsViewController.storyboard b/SQManagement/SQManagement/Connections/SQConnectionEventsViewController.storyboard new file mode 100644 index 00000000..1097ea86 --- /dev/null +++ b/SQManagement/SQManagement/Connections/SQConnectionEventsViewController.storyboard @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SQManagement/SQManagement/Model/SQConnectionModel.h b/SQManagement/SQManagement/Connections/SQConnectionModel.h similarity index 100% rename from SQManagement/SQManagement/Model/SQConnectionModel.h rename to SQManagement/SQManagement/Connections/SQConnectionModel.h diff --git a/SQManagement/SQManagement/Model/SQConnectionModel.m b/SQManagement/SQManagement/Connections/SQConnectionModel.m similarity index 100% rename from SQManagement/SQManagement/Model/SQConnectionModel.m rename to SQManagement/SQManagement/Connections/SQConnectionModel.m diff --git a/SQManagement/SQManagement/Coms/SQConnectionPropertyCell.h b/SQManagement/SQManagement/Connections/SQConnectionPropertyCell.h similarity index 100% rename from SQManagement/SQManagement/Coms/SQConnectionPropertyCell.h rename to SQManagement/SQManagement/Connections/SQConnectionPropertyCell.h diff --git a/SQManagement/SQManagement/Coms/SQConnectionPropertyCell.m b/SQManagement/SQManagement/Connections/SQConnectionPropertyCell.m similarity index 100% rename from SQManagement/SQManagement/Coms/SQConnectionPropertyCell.m rename to SQManagement/SQManagement/Connections/SQConnectionPropertyCell.m diff --git a/SQManagement/SQManagement/Coms/SQConnectionPropertyCell.xib b/SQManagement/SQManagement/Connections/SQConnectionPropertyCell.xib similarity index 100% rename from SQManagement/SQManagement/Coms/SQConnectionPropertyCell.xib rename to SQManagement/SQManagement/Connections/SQConnectionPropertyCell.xib diff --git a/SQManagement/SQManagement/UI/SQConnectionsViewController.h b/SQManagement/SQManagement/Connections/SQConnectionsViewController.h similarity index 100% rename from SQManagement/SQManagement/UI/SQConnectionsViewController.h rename to SQManagement/SQManagement/Connections/SQConnectionsViewController.h diff --git a/SQManagement/SQManagement/UI/SQConnectionsViewController.m b/SQManagement/SQManagement/Connections/SQConnectionsViewController.m similarity index 67% rename from SQManagement/SQManagement/UI/SQConnectionsViewController.m rename to SQManagement/SQManagement/Connections/SQConnectionsViewController.m index f0f93188..5863bedb 100644 --- a/SQManagement/SQManagement/UI/SQConnectionsViewController.m +++ b/SQManagement/SQManagement/Connections/SQConnectionsViewController.m @@ -9,7 +9,9 @@ #import "SQConnectionsViewController.h" #import "SQH1TitleView.h" #import "SQSearchInputView.h" -#import "SQAuthorizationManager.h" +#import "SQAuthorizationTool.h" +#import "SQConnectionEventsViewController.h" +#import "SQConnectionModel.h" @interface SQConnectionsViewController () @property (nonatomic, strong) NSMutableArray *dataSource; @@ -21,7 +23,7 @@ - (void)viewDidLoad { [super viewDidLoad]; self.title = @"人脉"; self.dataSource = [NSMutableArray array]; - [SQAuthorizationManager fetchContacts:^(NSString *name, NSArray *phoneNumbers) { + [SQAuthorizationTool fetchContacts:^(NSString *name, NSArray *phoneNumbers) { [self.dataSource addObject:name]; [self.tableView reloadData]; }]; @@ -59,4 +61,13 @@ - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSIntege return 44; } +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { + [tableView deselectRowAtIndexPath:indexPath animated:YES]; + SQConnectionEventsViewController *connectionEventsVc = [[UIStoryboard storyboardWithName:NSStringFromClass(SQConnectionEventsViewController.class) bundle:nil] instantiateInitialViewController]; + SQConnectionModel *connection = [SQConnectionModel new]; + connection.name = self.dataSource[indexPath.row]; + connectionEventsVc.connection = connection; + [self.navigationController pushViewController:connectionEventsVc animated:YES]; +} + @end diff --git a/SQManagement/SQManagement/UI/SQEnergyViewController.h b/SQManagement/SQManagement/Energy/SQEnergyViewController.h similarity index 100% rename from SQManagement/SQManagement/UI/SQEnergyViewController.h rename to SQManagement/SQManagement/Energy/SQEnergyViewController.h diff --git a/SQManagement/SQManagement/UI/SQEnergyViewController.m b/SQManagement/SQManagement/Energy/SQEnergyViewController.m similarity index 100% rename from SQManagement/SQManagement/UI/SQEnergyViewController.m rename to SQManagement/SQManagement/Energy/SQEnergyViewController.m diff --git a/SQManagement/SQManagement/UI/SQProjectTimeViewController.h b/SQManagement/SQManagement/Time/SQTimeEventsViewController.h similarity index 79% rename from SQManagement/SQManagement/UI/SQProjectTimeViewController.h rename to SQManagement/SQManagement/Time/SQTimeEventsViewController.h index 17e98cd3..84883701 100644 --- a/SQManagement/SQManagement/UI/SQProjectTimeViewController.h +++ b/SQManagement/SQManagement/Time/SQTimeEventsViewController.h @@ -10,7 +10,7 @@ NS_ASSUME_NONNULL_BEGIN -@interface SQProjectTimeViewController : UIViewController +@interface SQTimeEventsViewController : UIViewController @end diff --git a/SQManagement/SQManagement/UI/SQProjectTimeViewController.m b/SQManagement/SQManagement/Time/SQTimeEventsViewController.m similarity index 82% rename from SQManagement/SQManagement/UI/SQProjectTimeViewController.m rename to SQManagement/SQManagement/Time/SQTimeEventsViewController.m index 9acb8940..1ec54c09 100644 --- a/SQManagement/SQManagement/UI/SQProjectTimeViewController.m +++ b/SQManagement/SQManagement/Time/SQTimeEventsViewController.m @@ -6,13 +6,13 @@ // Copyright © 2019 Castie!. All rights reserved. // -#import "SQProjectTimeViewController.h" +#import "SQTimeEventsViewController.h" -@interface SQProjectTimeViewController () +@interface SQTimeEventsViewController () @end -@implementation SQProjectTimeViewController +@implementation SQTimeEventsViewController - (void)viewDidLoad { [super viewDidLoad]; diff --git a/SQManagement/SQManagement/UI/SQTimeViewController.h b/SQManagement/SQManagement/Time/SQTimeViewController.h similarity index 100% rename from SQManagement/SQManagement/UI/SQTimeViewController.h rename to SQManagement/SQManagement/Time/SQTimeViewController.h diff --git a/SQManagement/SQManagement/UI/SQTimeViewController.m b/SQManagement/SQManagement/Time/SQTimeViewController.m similarity index 92% rename from SQManagement/SQManagement/UI/SQTimeViewController.m rename to SQManagement/SQManagement/Time/SQTimeViewController.m index 4eac1999..749fd589 100644 --- a/SQManagement/SQManagement/UI/SQTimeViewController.m +++ b/SQManagement/SQManagement/Time/SQTimeViewController.m @@ -9,7 +9,7 @@ #import "SQTimeViewController.h" #import "SQH1TitleView.h" #import "SQSearchInputView.h" -#import "SQProjectTimeViewController.h" +#import "SQTimeEventsViewController.h" @interface SQTimeViewController () @end @@ -55,7 +55,7 @@ - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSIntege - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; - [self.navigationController pushViewController:[SQProjectTimeViewController new] animated:YES]; + [self.navigationController pushViewController:[SQTimeEventsViewController new] animated:YES]; } @end diff --git a/SQManagement/SQManagement/Tools/SQAuthorizationManager.h b/SQManagement/SQManagement/Tools/SQAuthorizationTool.h similarity index 87% rename from SQManagement/SQManagement/Tools/SQAuthorizationManager.h rename to SQManagement/SQManagement/Tools/SQAuthorizationTool.h index 11d7240b..be0ce0f8 100644 --- a/SQManagement/SQManagement/Tools/SQAuthorizationManager.h +++ b/SQManagement/SQManagement/Tools/SQAuthorizationTool.h @@ -10,7 +10,7 @@ NS_ASSUME_NONNULL_BEGIN -@interface SQAuthorizationManager : NSObject +@interface SQAuthorizationTool : NSObject + (void)fetchContacts: (void(^)(NSString *, NSArray *))callback; diff --git a/SQManagement/SQManagement/Tools/SQAuthorizationManager.m b/SQManagement/SQManagement/Tools/SQAuthorizationTool.m similarity index 94% rename from SQManagement/SQManagement/Tools/SQAuthorizationManager.m rename to SQManagement/SQManagement/Tools/SQAuthorizationTool.m index ae3b5ca7..28c8e61f 100644 --- a/SQManagement/SQManagement/Tools/SQAuthorizationManager.m +++ b/SQManagement/SQManagement/Tools/SQAuthorizationTool.m @@ -1,15 +1,15 @@ // -// SQAuthorizationManager.m +// SQAuthorizationTool.m // SQManagement // // Created by 朱双泉 on 2019/9/22. // Copyright © 2019 Castie!. All rights reserved. // -#import "SQAuthorizationManager.h" +#import "SQAuthorizationTool.h" #import -@implementation SQAuthorizationManager +@implementation SQAuthorizationTool + (void)fetchContacts:(void (^)(NSString *, NSArray *))callback { dispatch_async(dispatch_get_main_queue(), ^{ diff --git a/SQManagement/SQManagement/UI/Main~.storyboard b/SQManagement/SQManagement/UI/Main~.storyboard new file mode 100644 index 00000000..62eb51e7 --- /dev/null +++ b/SQManagement/SQManagement/UI/Main~.storyboard @@ -0,0 +1,242 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SQManagement/SQManagement/Coms/SQH1TitleView.h b/SQManagement/SQManagement/UI/SQH1TitleView.h similarity index 100% rename from SQManagement/SQManagement/Coms/SQH1TitleView.h rename to SQManagement/SQManagement/UI/SQH1TitleView.h diff --git a/SQManagement/SQManagement/Coms/SQH1TitleView.m b/SQManagement/SQManagement/UI/SQH1TitleView.m similarity index 100% rename from SQManagement/SQManagement/Coms/SQH1TitleView.m rename to SQManagement/SQManagement/UI/SQH1TitleView.m diff --git a/SQManagement/SQManagement/Coms/SQH1TitleView.xib b/SQManagement/SQManagement/UI/SQH1TitleView.xib similarity index 100% rename from SQManagement/SQManagement/Coms/SQH1TitleView.xib rename to SQManagement/SQManagement/UI/SQH1TitleView.xib diff --git a/SQManagement/SQManagement/Coms/SQProfileHeaderView.h b/SQManagement/SQManagement/UI/SQProfileHeaderView.h similarity index 100% rename from SQManagement/SQManagement/Coms/SQProfileHeaderView.h rename to SQManagement/SQManagement/UI/SQProfileHeaderView.h diff --git a/SQManagement/SQManagement/Coms/SQProfileHeaderView.m b/SQManagement/SQManagement/UI/SQProfileHeaderView.m similarity index 100% rename from SQManagement/SQManagement/Coms/SQProfileHeaderView.m rename to SQManagement/SQManagement/UI/SQProfileHeaderView.m diff --git a/SQManagement/SQManagement/Coms/SQProfileHeaderView.xib b/SQManagement/SQManagement/UI/SQProfileHeaderView.xib similarity index 100% rename from SQManagement/SQManagement/Coms/SQProfileHeaderView.xib rename to SQManagement/SQManagement/UI/SQProfileHeaderView.xib diff --git a/SQManagement/SQManagement/Coms/SQSearchInputView.h b/SQManagement/SQManagement/UI/SQSearchInputView.h similarity index 100% rename from SQManagement/SQManagement/Coms/SQSearchInputView.h rename to SQManagement/SQManagement/UI/SQSearchInputView.h diff --git a/SQManagement/SQManagement/Coms/SQSearchInputView.m b/SQManagement/SQManagement/UI/SQSearchInputView.m similarity index 100% rename from SQManagement/SQManagement/Coms/SQSearchInputView.m rename to SQManagement/SQManagement/UI/SQSearchInputView.m diff --git a/SQManagement/SQManagement/Coms/SQSearchInputView.xib b/SQManagement/SQManagement/UI/SQSearchInputView.xib similarity index 100% rename from SQManagement/SQManagement/Coms/SQSearchInputView.xib rename to SQManagement/SQManagement/UI/SQSearchInputView.xib