From d43d7eaaf692de499eeca4a164dcb7c84c3f5089 Mon Sep 17 00:00:00 2001 From: lianxiang <13052344590@163.com> Date: Thu, 23 Aug 2018 18:09:15 +0800 Subject: [PATCH] add message exercises --- GIGA.xcodeproj/project.pbxproj | 152 ++++++++++++++ GIGA/AppDelegate.m | 31 +++ .../Contents.json | 18 ++ .../exerc_answer_option_nor@2x.png | Bin 0 -> 1557 bytes .../exerc_answer_option_nor@3x.png | Bin 0 -> 2037 bytes .../Contents.json | 18 ++ .../exerc_answer_option_sel@2x.png | Bin 0 -> 1678 bytes .../exerc_answer_option_sel@3x.png | Bin 0 -> 2533 bytes GIGA/Base.lproj/LaunchScreen.storyboard | 9 +- GIGA/Base.lproj/Main.storyboard | 16 +- GIGA/Category/NSString+MD5.h | 14 ++ GIGA/Category/NSString+MD5.m | 30 +++ GIGA/Common/BaseVC/GiGaBaseViewController.h | 30 +-- GIGA/Common/BaseVC/GiGaBaseViewController.m | 85 +++++++- GIGA/Common/GiGaHelper.h | 4 + GIGA/Common/GiGaHelper.m | 5 + .../GiGaNavTitileView/GiGaNavTitileView.h | 13 ++ .../GiGaNavTitileView/GiGaNavTitileView.m | 28 +++ GIGA/GIGA.pch | 2 + GIGA/Info.plist | 1 + .../AppAD/GiGaStartAdView/GiGaStartAdView.h | 1 + .../AppAD/GiGaStartAdView/GiGaStartAdView.m | 8 +- .../Controller/GiGaRegistViewController.xib | 46 ++-- .../LogIn/Controller/GiGaUserLoginVC.m | 2 +- .../LogIn/Controller/GiGaUserLoginVC.xib | 52 +++-- .../Controller/GiGaWebViewController.xib | 14 +- .../LogIn/Controller/PassWordResetVC.xib | 38 ++-- .../Controller/GiGaMaskTaskViewController.m | 54 ++++- .../Exercises/Controller/GiGaQuestionVC.h | 14 ++ .../Exercises/Controller/GiGaQuestionVC.m | 189 +++++++++++++++++ .../Mask/Exercises/Model/GiGaQuestionModel.h | 43 ++++ .../Mask/Exercises/Model/GiGaQuestionModel.m | 13 ++ .../Mask/Exercises/View/GIGAQuetionView.h | 32 +++ .../Mask/Exercises/View/GIGAQuetionView.m | 197 ++++++++++++++++++ .../Controller/ActiveMesagelistVC.h | 13 ++ .../Controller/ActiveMesagelistVC.m | 99 +++++++++ .../Controller/GiGaMasssagesVC.h | 13 ++ .../Controller/GiGaMasssagesVC.m | 106 ++++++++++ .../Controller/GiGaServiceViewController.h | 13 ++ .../Controller/GiGaServiceViewController.m | 39 ++++ .../Controller/GiGaSystemViewController.h | 13 ++ .../Controller/GiGaSystemViewController.m | 40 ++++ .../Controller/MessageDetailViewController.h | 13 ++ .../Controller/MessageDetailViewController.m | 39 ++++ .../MessageCenter/View/MAssaageCenterCell.h | 18 ++ .../MessageCenter/View/MAssaageCenterCell.m | 42 ++++ .../MessageCenter/View/MAssaageCenterCell.xib | 76 +++++++ .../MessageCenter/View/MessageListViewCell.h | 14 ++ .../MessageCenter/View/MessageListViewCell.m | 24 +++ .../View/MessageListViewCell.xib | 113 ++++++++++ GIGA/ViewController.m | 1 - 51 files changed, 1713 insertions(+), 122 deletions(-) create mode 100644 GIGA/Assets.xcassets/maskTime/exerc_answer_option_nor.imageset/Contents.json create mode 100644 GIGA/Assets.xcassets/maskTime/exerc_answer_option_nor.imageset/exerc_answer_option_nor@2x.png create mode 100644 GIGA/Assets.xcassets/maskTime/exerc_answer_option_nor.imageset/exerc_answer_option_nor@3x.png create mode 100644 GIGA/Assets.xcassets/maskTime/exerc_answer_option_sel.imageset/Contents.json create mode 100644 GIGA/Assets.xcassets/maskTime/exerc_answer_option_sel.imageset/exerc_answer_option_sel@2x.png create mode 100644 GIGA/Assets.xcassets/maskTime/exerc_answer_option_sel.imageset/exerc_answer_option_sel@3x.png create mode 100644 GIGA/Category/NSString+MD5.h create mode 100644 GIGA/Category/NSString+MD5.m create mode 100644 GIGA/Common/GiGaNavTitileView/GiGaNavTitileView.h create mode 100644 GIGA/Common/GiGaNavTitileView/GiGaNavTitileView.m create mode 100644 GIGA/Modules/Mask/Exercises/Controller/GiGaQuestionVC.h create mode 100644 GIGA/Modules/Mask/Exercises/Controller/GiGaQuestionVC.m create mode 100644 GIGA/Modules/Mask/Exercises/Model/GiGaQuestionModel.h create mode 100644 GIGA/Modules/Mask/Exercises/Model/GiGaQuestionModel.m create mode 100644 GIGA/Modules/Mask/Exercises/View/GIGAQuetionView.h create mode 100644 GIGA/Modules/Mask/Exercises/View/GIGAQuetionView.m create mode 100644 GIGA/Modules/MessageCenter/Controller/ActiveMesagelistVC.h create mode 100644 GIGA/Modules/MessageCenter/Controller/ActiveMesagelistVC.m create mode 100644 GIGA/Modules/MessageCenter/Controller/GiGaMasssagesVC.h create mode 100644 GIGA/Modules/MessageCenter/Controller/GiGaMasssagesVC.m create mode 100644 GIGA/Modules/MessageCenter/Controller/GiGaServiceViewController.h create mode 100644 GIGA/Modules/MessageCenter/Controller/GiGaServiceViewController.m create mode 100644 GIGA/Modules/MessageCenter/Controller/GiGaSystemViewController.h create mode 100644 GIGA/Modules/MessageCenter/Controller/GiGaSystemViewController.m create mode 100644 GIGA/Modules/MessageCenter/Controller/MessageDetailViewController.h create mode 100644 GIGA/Modules/MessageCenter/Controller/MessageDetailViewController.m create mode 100644 GIGA/Modules/MessageCenter/View/MAssaageCenterCell.h create mode 100644 GIGA/Modules/MessageCenter/View/MAssaageCenterCell.m create mode 100644 GIGA/Modules/MessageCenter/View/MAssaageCenterCell.xib create mode 100644 GIGA/Modules/MessageCenter/View/MessageListViewCell.h create mode 100644 GIGA/Modules/MessageCenter/View/MessageListViewCell.m create mode 100644 GIGA/Modules/MessageCenter/View/MessageListViewCell.xib diff --git a/GIGA.xcodeproj/project.pbxproj b/GIGA.xcodeproj/project.pbxproj index 97957cf..5ade598 100644 --- a/GIGA.xcodeproj/project.pbxproj +++ b/GIGA.xcodeproj/project.pbxproj @@ -57,6 +57,20 @@ 8361B4322121832800238FEB /* GiGaBaseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8361B4312121832800238FEB /* GiGaBaseViewController.m */; }; 8361B4352121836700238FEB /* GiGaBaseNavViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8361B4342121836700238FEB /* GiGaBaseNavViewController.m */; }; 8361B4382121847600238FEB /* UINavigationBar+Custom.m in Sources */ = {isa = PBXBuildFile; fileRef = 8361B4372121847600238FEB /* UINavigationBar+Custom.m */; }; + 83835BA0212E43BD001480F2 /* GiGaMasssagesVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 83835B9F212E43BD001480F2 /* GiGaMasssagesVC.m */; }; + 83835BA7212E4748001480F2 /* MAssaageCenterCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 83835BA5212E4748001480F2 /* MAssaageCenterCell.m */; }; + 83835BA8212E4748001480F2 /* MAssaageCenterCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 83835BA6212E4748001480F2 /* MAssaageCenterCell.xib */; }; + 83835BAF212E4FCD001480F2 /* MessageListViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 83835BAD212E4FCD001480F2 /* MessageListViewCell.m */; }; + 83835BB0212E4FCD001480F2 /* MessageListViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 83835BAE212E4FCD001480F2 /* MessageListViewCell.xib */; }; + 83835BB3212E50ED001480F2 /* ActiveMesagelistVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 83835BB2212E50ED001480F2 /* ActiveMesagelistVC.m */; }; + 83835BB6212E5174001480F2 /* GiGaServiceViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83835BB5212E5174001480F2 /* GiGaServiceViewController.m */; }; + 83835BB9212E51B0001480F2 /* GiGaSystemViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83835BB8212E51B0001480F2 /* GiGaSystemViewController.m */; }; + 83835BBC212E60E5001480F2 /* MessageDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83835BBB212E60E5001480F2 /* MessageDetailViewController.m */; }; + 83835BC3212E677C001480F2 /* GiGaQuestionVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 83835BC2212E677C001480F2 /* GiGaQuestionVC.m */; }; + 83835BC7212E7BBF001480F2 /* GiGaNavTitileView.m in Sources */ = {isa = PBXBuildFile; fileRef = 83835BC6212E7BBF001480F2 /* GiGaNavTitileView.m */; }; + 83835BCA212E8045001480F2 /* GIGAQuetionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 83835BC9212E8045001480F2 /* GIGAQuetionView.m */; }; + 83835BCD212E856A001480F2 /* NSString+MD5.m in Sources */ = {isa = PBXBuildFile; fileRef = 83835BCC212E856A001480F2 /* NSString+MD5.m */; }; + 83835BD0212E8B9C001480F2 /* GiGaQuestionModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 83835BCF212E8B9C001480F2 /* GiGaQuestionModel.m */; }; 83A2270C212A97ED00B3E75C /* MaskViewBootomWaringView.m in Sources */ = {isa = PBXBuildFile; fileRef = 83A2270B212A97ED00B3E75C /* MaskViewBootomWaringView.m */; }; 83A22712212A9EA900B3E75C /* UIView+Sizes.m in Sources */ = {isa = PBXBuildFile; fileRef = 83A22710212A9EA900B3E75C /* UIView+Sizes.m */; }; 83A22718212ABDFF00B3E75C /* GiGaBlockButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 83A22717212ABDFF00B3E75C /* GiGaBlockButton.m */; }; @@ -169,6 +183,32 @@ 8361B4342121836700238FEB /* GiGaBaseNavViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaBaseNavViewController.m; sourceTree = ""; }; 8361B4362121847600238FEB /* UINavigationBar+Custom.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UINavigationBar+Custom.h"; sourceTree = ""; }; 8361B4372121847600238FEB /* UINavigationBar+Custom.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UINavigationBar+Custom.m"; sourceTree = ""; }; + 83835B9E212E43BD001480F2 /* GiGaMasssagesVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaMasssagesVC.h; sourceTree = ""; }; + 83835B9F212E43BD001480F2 /* GiGaMasssagesVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaMasssagesVC.m; sourceTree = ""; }; + 83835BA4212E4748001480F2 /* MAssaageCenterCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MAssaageCenterCell.h; sourceTree = ""; }; + 83835BA5212E4748001480F2 /* MAssaageCenterCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MAssaageCenterCell.m; sourceTree = ""; }; + 83835BA6212E4748001480F2 /* MAssaageCenterCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MAssaageCenterCell.xib; sourceTree = ""; }; + 83835BAC212E4FCD001480F2 /* MessageListViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MessageListViewCell.h; sourceTree = ""; }; + 83835BAD212E4FCD001480F2 /* MessageListViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MessageListViewCell.m; sourceTree = ""; }; + 83835BAE212E4FCD001480F2 /* MessageListViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MessageListViewCell.xib; sourceTree = ""; }; + 83835BB1212E50ED001480F2 /* ActiveMesagelistVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ActiveMesagelistVC.h; sourceTree = ""; }; + 83835BB2212E50ED001480F2 /* ActiveMesagelistVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ActiveMesagelistVC.m; sourceTree = ""; }; + 83835BB4212E5174001480F2 /* GiGaServiceViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaServiceViewController.h; sourceTree = ""; }; + 83835BB5212E5174001480F2 /* GiGaServiceViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaServiceViewController.m; sourceTree = ""; }; + 83835BB7212E51B0001480F2 /* GiGaSystemViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaSystemViewController.h; sourceTree = ""; }; + 83835BB8212E51B0001480F2 /* GiGaSystemViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaSystemViewController.m; sourceTree = ""; }; + 83835BBA212E60E5001480F2 /* MessageDetailViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MessageDetailViewController.h; sourceTree = ""; }; + 83835BBB212E60E5001480F2 /* MessageDetailViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MessageDetailViewController.m; sourceTree = ""; }; + 83835BC1212E677C001480F2 /* GiGaQuestionVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaQuestionVC.h; sourceTree = ""; }; + 83835BC2212E677C001480F2 /* GiGaQuestionVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaQuestionVC.m; sourceTree = ""; }; + 83835BC5212E7BBF001480F2 /* GiGaNavTitileView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaNavTitileView.h; sourceTree = ""; }; + 83835BC6212E7BBF001480F2 /* GiGaNavTitileView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaNavTitileView.m; sourceTree = ""; }; + 83835BC8212E8045001480F2 /* GIGAQuetionView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GIGAQuetionView.h; sourceTree = ""; }; + 83835BC9212E8045001480F2 /* GIGAQuetionView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GIGAQuetionView.m; sourceTree = ""; }; + 83835BCB212E856A001480F2 /* NSString+MD5.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSString+MD5.h"; sourceTree = ""; }; + 83835BCC212E856A001480F2 /* NSString+MD5.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSString+MD5.m"; sourceTree = ""; }; + 83835BCE212E8B9C001480F2 /* GiGaQuestionModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaQuestionModel.h; sourceTree = ""; }; + 83835BCF212E8B9C001480F2 /* GiGaQuestionModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaQuestionModel.m; sourceTree = ""; }; 83A2270A212A97ED00B3E75C /* MaskViewBootomWaringView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MaskViewBootomWaringView.h; sourceTree = ""; }; 83A2270B212A97ED00B3E75C /* MaskViewBootomWaringView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MaskViewBootomWaringView.m; sourceTree = ""; }; 83A22710212A9EA900B3E75C /* UIView+Sizes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+Sizes.m"; sourceTree = ""; }; @@ -400,6 +440,7 @@ 8361B3FC21215C7400238FEB /* Common */ = { isa = PBXGroup; children = ( + 83835BC4212E7B96001480F2 /* GiGaNavTitileView */, 835060AA212D4C0F007E6220 /* GiGaFileManager */, 83346AC8212BD4160054D597 /* Source */, 8357ADCA2123BFD8000816F2 /* GiGaNetTool */, @@ -431,6 +472,8 @@ 8361B4372121847600238FEB /* UINavigationBar+Custom.m */, 83A22716212ABDFF00B3E75C /* GiGaBlockButton.h */, 83A22717212ABDFF00B3E75C /* GiGaBlockButton.m */, + 83835BCB212E856A001480F2 /* NSString+MD5.h */, + 83835BCC212E856A001480F2 /* NSString+MD5.m */, ); path = Category; sourceTree = ""; @@ -438,6 +481,7 @@ 8361B3FF21215C9D00238FEB /* Modules */ = { isa = PBXGroup; children = ( + 83835B9D212E4335001480F2 /* MessageCenter */, 835060AE212D5423007E6220 /* AppAD */, 83E40B3021219078008149C4 /* Mask */, 83E40B2C21218B7E008149C4 /* LogIn */, @@ -537,6 +581,99 @@ path = BaseVC; sourceTree = ""; }; + 83835B9D212E4335001480F2 /* MessageCenter */ = { + isa = PBXGroup; + children = ( + 83835BA3212E4623001480F2 /* Model */, + 83835BA2212E4618001480F2 /* View */, + 83835BA1212E4602001480F2 /* Controller */, + ); + path = MessageCenter; + sourceTree = ""; + }; + 83835BA1212E4602001480F2 /* Controller */ = { + isa = PBXGroup; + children = ( + 83835B9E212E43BD001480F2 /* GiGaMasssagesVC.h */, + 83835B9F212E43BD001480F2 /* GiGaMasssagesVC.m */, + 83835BB1212E50ED001480F2 /* ActiveMesagelistVC.h */, + 83835BB2212E50ED001480F2 /* ActiveMesagelistVC.m */, + 83835BB4212E5174001480F2 /* GiGaServiceViewController.h */, + 83835BB5212E5174001480F2 /* GiGaServiceViewController.m */, + 83835BB7212E51B0001480F2 /* GiGaSystemViewController.h */, + 83835BB8212E51B0001480F2 /* GiGaSystemViewController.m */, + 83835BBA212E60E5001480F2 /* MessageDetailViewController.h */, + 83835BBB212E60E5001480F2 /* MessageDetailViewController.m */, + ); + path = Controller; + sourceTree = ""; + }; + 83835BA2212E4618001480F2 /* View */ = { + isa = PBXGroup; + children = ( + 83835BA4212E4748001480F2 /* MAssaageCenterCell.h */, + 83835BA5212E4748001480F2 /* MAssaageCenterCell.m */, + 83835BA6212E4748001480F2 /* MAssaageCenterCell.xib */, + 83835BAC212E4FCD001480F2 /* MessageListViewCell.h */, + 83835BAD212E4FCD001480F2 /* MessageListViewCell.m */, + 83835BAE212E4FCD001480F2 /* MessageListViewCell.xib */, + ); + path = View; + sourceTree = ""; + }; + 83835BA3212E4623001480F2 /* Model */ = { + isa = PBXGroup; + children = ( + ); + path = Model; + sourceTree = ""; + }; + 83835BBD212E6676001480F2 /* Exercises */ = { + isa = PBXGroup; + children = ( + 83835BC0212E66A1001480F2 /* View */, + 83835BBF212E6698001480F2 /* Model */, + 83835BBE212E6690001480F2 /* Controller */, + ); + path = Exercises; + sourceTree = ""; + }; + 83835BBE212E6690001480F2 /* Controller */ = { + isa = PBXGroup; + children = ( + 83835BC1212E677C001480F2 /* GiGaQuestionVC.h */, + 83835BC2212E677C001480F2 /* GiGaQuestionVC.m */, + ); + path = Controller; + sourceTree = ""; + }; + 83835BBF212E6698001480F2 /* Model */ = { + isa = PBXGroup; + children = ( + 83835BCE212E8B9C001480F2 /* GiGaQuestionModel.h */, + 83835BCF212E8B9C001480F2 /* GiGaQuestionModel.m */, + ); + path = Model; + sourceTree = ""; + }; + 83835BC0212E66A1001480F2 /* View */ = { + isa = PBXGroup; + children = ( + 83835BC8212E8045001480F2 /* GIGAQuetionView.h */, + 83835BC9212E8045001480F2 /* GIGAQuetionView.m */, + ); + path = View; + sourceTree = ""; + }; + 83835BC4212E7B96001480F2 /* GiGaNavTitileView */ = { + isa = PBXGroup; + children = ( + 83835BC5212E7BBF001480F2 /* GiGaNavTitileView.h */, + 83835BC6212E7BBF001480F2 /* GiGaNavTitileView.m */, + ); + path = GiGaNavTitileView; + sourceTree = ""; + }; 83A22719212AC7FC00B3E75C /* View */ = { isa = PBXGroup; children = ( @@ -583,6 +720,7 @@ 83E40B3021219078008149C4 /* Mask */ = { isa = PBXGroup; children = ( + 83835BBD212E6676001480F2 /* Exercises */, 8354B3832121BB00004F448F /* View */, 8354B3822121BAFA004F448F /* Model */, 8354B3812121BAE1004F448F /* Controller */, @@ -726,8 +864,10 @@ 83A22720212AC8C100B3E75C /* GiGaUserLoginVC.xib in Resources */, 83346AC1212BB50A0054D597 /* PassWordResetVC.xib in Resources */, 83346AD1212BF5B70054D597 /* useragreement.html in Resources */, + 83835BA8212E4748001480F2 /* MAssaageCenterCell.xib in Resources */, 8361B3D3212155C300238FEB /* Assets.xcassets in Resources */, 8361B3D1212155C200238FEB /* Main.storyboard in Resources */, + 83835BB0212E4FCD001480F2 /* MessageListViewCell.xib in Resources */, 83346ACF212BD7830054D597 /* GiGaWebViewController.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -824,31 +964,43 @@ 83346AC5212BBC8C0054D597 /* GiGaRegistViewController.m in Sources */, 83346AD7212C18F50054D597 /* GiGaAppGaurdVC.m in Sources */, 8349585C212511040064DB6C /* AppDelegate+ThirdParty.m in Sources */, + 83835BCA212E8045001480F2 /* GIGAQuetionView.m in Sources */, 8361B3CE212155C200238FEB /* ViewController.m in Sources */, 8361B4382121847600238FEB /* UINavigationBar+Custom.m in Sources */, 83346AD4212BFF6E0054D597 /* UserGuardViewController.m in Sources */, 8357ADC92123BFCA000816F2 /* GiGaUserManager.m in Sources */, + 83835BB3212E50ED001480F2 /* ActiveMesagelistVC.m in Sources */, + 83835BC3212E677C001480F2 /* GiGaQuestionVC.m in Sources */, 83A2271F212AC8C100B3E75C /* GiGaUserLoginVC.m in Sources */, 83346ACE212BD7830054D597 /* GiGaWebViewController.m in Sources */, 8357ADD82124027D000816F2 /* GiGaUserDefault.m in Sources */, + 83835BB6212E5174001480F2 /* GiGaServiceViewController.m in Sources */, 8361B40721215E6F00238FEB /* GiGaHelper.m in Sources */, + 83835BA0212E43BD001480F2 /* GiGaMasssagesVC.m in Sources */, 8357ADCD2123C091000816F2 /* GiGaNetManager.m in Sources */, 835060A9212D38EE007E6220 /* GiGaStartAdView.m in Sources */, 833DA7762122A62000A5C614 /* GiGaMaskTaskViewController.m in Sources */, 8357ADD02123C5F7000816F2 /* GiGaAPIRequest.m in Sources */, + 83835BD0212E8B9C001480F2 /* GiGaQuestionModel.m in Sources */, + 83835BAF212E4FCD001480F2 /* MessageListViewCell.m in Sources */, 8361B3D9212155C300238FEB /* main.m in Sources */, 835060A2212D1225007E6220 /* GiGaMeViewController.m in Sources */, 8361B3CB212155C200238FEB /* AppDelegate.m in Sources */, + 83835BBC212E60E5001480F2 /* MessageDetailViewController.m in Sources */, + 83835BCD212E856A001480F2 /* NSString+MD5.m in Sources */, + 83835BC7212E7BBF001480F2 /* GiGaNavTitileView.m in Sources */, 8361B4322121832800238FEB /* GiGaBaseViewController.m in Sources */, 8357ADD32123C7C6000816F2 /* GiGaAPIResult.m in Sources */, 8361B4352121836700238FEB /* GiGaBaseNavViewController.m in Sources */, 835060B3212D54C2007E6220 /* GiGaAdDetailViewController.m in Sources */, 83346AC0212BB50A0054D597 /* PassWordResetVC.m in Sources */, + 83835BB9212E51B0001480F2 /* GiGaSystemViewController.m in Sources */, 8361B40421215E0C00238FEB /* LXCountTimer.m in Sources */, 8357ADC52123BEBD000816F2 /* GiGaUser.m in Sources */, 83E40B2F21218BA0008149C4 /* GiGaUserViewController.m in Sources */, 835060A5212D3536007E6220 /* AppDelegate+GiGaConfig.m in Sources */, 83E40B2B21218B6F008149C4 /* GiGaExercisesViewController.m in Sources */, + 83835BA7212E4748001480F2 /* MAssaageCenterCell.m in Sources */, 8361B42E2121812000238FEB /* GiGaServerConfig.m in Sources */, 83A22712212A9EA900B3E75C /* UIView+Sizes.m in Sources */, 83A22718212ABDFF00B3E75C /* GiGaBlockButton.m in Sources */, diff --git a/GIGA/AppDelegate.m b/GIGA/AppDelegate.m index 86089bd..2a90437 100644 --- a/GIGA/AppDelegate.m +++ b/GIGA/AppDelegate.m @@ -13,6 +13,9 @@ #import "JPUSHService.h" @interface AppDelegate () +//保持后台长时间运行 +@property (nonatomic,assign) UIBackgroundTaskIdentifier backgroundTask; +@property (nonatomic,strong) NSTimer *timer; @end @@ -46,9 +49,37 @@ // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + //后台模式 + [self creatBackGoundTask]; + } +-(void)creatBackGoundTask{ + //告诉系统当前app在后台有任务处理,需要时间 + self.backgroundTask = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:^{ + [[UIApplication sharedApplication] endBackgroundTask:self.backgroundTask]; + self.backgroundTask = UIBackgroundTaskInvalid; + + }]; + self.timer = [NSTimer scheduledTimerWithTimeInterval:30.0 target:self selector:@selector(applyToActiveForMoreTime) userInfo:nil repeats:YES]; + [self.timer fire]; +} +-(void)applyToActiveForMoreTime{ + + //如果系统给的剩余时间小于60秒 就终止当前的后台任务,再重新初始化一个后台任务,重新让系统分配时间,这样一直循环下去,保持APP在后台一直处于active状态。 + if ([UIApplication sharedApplication].backgroundTimeRemaining < 60.0) { + {//如果剩余时间小于60秒 + [[UIApplication sharedApplication] endBackgroundTask:self.backgroundTask]; + self.backgroundTask = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:^{ + [[UIApplication sharedApplication] endBackgroundTask:self.backgroundTask]; + self.backgroundTask = UIBackgroundTaskInvalid; + }]; + + } + } + +} - (void)applicationWillEnterForeground:(UIApplication *)application { application.applicationIconBadgeNumber = 0; [JPUSHService resetBadge]; diff --git a/GIGA/Assets.xcassets/maskTime/exerc_answer_option_nor.imageset/Contents.json b/GIGA/Assets.xcassets/maskTime/exerc_answer_option_nor.imageset/Contents.json new file mode 100644 index 0000000..db7bdf5 --- /dev/null +++ b/GIGA/Assets.xcassets/maskTime/exerc_answer_option_nor.imageset/Contents.json @@ -0,0 +1,18 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "exerc_answer_option_nor@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "exerc_answer_option_nor@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/GIGA/Assets.xcassets/maskTime/exerc_answer_option_nor.imageset/exerc_answer_option_nor@2x.png b/GIGA/Assets.xcassets/maskTime/exerc_answer_option_nor.imageset/exerc_answer_option_nor@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..dbeba2a2d23a87f7a071e8e261850776def050f4 GIT binary patch literal 1557 zcmeAS@N?(olHy`uVBq!ia0vp^Mj*_=1|;R|J2nC-$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWuD@%!-*I5hW46K32*3xq68pHF_1f1wh>l3^w)^1&PVosU-?Y zsp*+{wo31J?^jaDOtDo8H}y5}EpSfF$n>ZxN)4{^3rViZPPR-@vbR&PsjvbXkegbP zs8ErclUHn2VXFi-*9yo63F|8hm3bwJ6}oxF$}kgLQj3#|G7CyF^YauyCMG83 zmzLNn0bL65LT&-v*t}wBFaZNhzap_f-%!s0;1ij}#cv!SJllcAxdtD&KxtGT74laZsDo1vSF z1u)djj9_|Q@{>z*Q}aq-dQ%X3jd1D(rG(r9pv^9+MVV!(DQ-pixe8z(TV>*Oi=!J( z^PqZDaJ$6-r(S)aWAs7siWJW`w)gjiOM9v>&FK&>RPsC0X(6cIBRjEn9)_ znd75v4Hq*)wzyw8yN|tk0sos%n?-C?mR|3B`)Ssh-9}rY4(Lzd)p8J(VDwIyf4{1! zUjJi+==rnHw(2H1ziykxcg&H+r0B$pExsSvrZnnLdCihO$##*-zNQ#E?rgh#6L^oE zNIX;GIk8`XW!8bt#)p-MBD9{VYfcRNz+|%g)3u8koX6Ir@vT-$G~kMpeAPL-YFV%4 zAv4!q2YDj4TWrrYaPQZh$a8_Qja4mc>SNtvDe*w#Z~hxp6*e7>DK&G+y74r~_i0t8 z^ApJkL6OK*zsE{HoesZxbtXQ+`H7%~h=^qhP$j`L~{hea(rADOubt#M{!bzwWeKG(>x{Hyi3 zNn0*0a#1bL5RKTSbo_zrj0XyKkL`&@!qO$*ts8UF5jtY!m@99#oyq4 zb5BK9p8NIk(t^gsg=%Y)?wwJ&o^mdXU7Ys?gw{n1l|0bZ~&A59=QNh!^b_`jBE_&Pc`3* Tb+dQ?DyThO{an^LB{Ts557$B9 literal 0 HcmV?d00001 diff --git a/GIGA/Assets.xcassets/maskTime/exerc_answer_option_nor.imageset/exerc_answer_option_nor@3x.png b/GIGA/Assets.xcassets/maskTime/exerc_answer_option_nor.imageset/exerc_answer_option_nor@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..1b661331e727e19a4660141e9e74cab8c6dce939 GIT binary patch literal 2037 zcmaJ?Yg7|w8jcqffk3^WMmHFvf*v8s2fRGCW2u&brT6IZC1`}d3F&RjRNRP;( zlI;-{Orf;Og2)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?ZW|!x#9z+D2HWcN!4oGeZwo|kXRLNPnT?vxjjmOrd`x5Ns}fy^ zJFuZjQ{%+EuZn4HtMmzu&-lgG0EBdA%$YDByi_zaA={b%TK#!{$KIRms~cZ#GKPG4 z>?*s%y-3Y?w89}{CA$ZFw#gj1M|yv`b@^IY&R_(?oceL zwu|k5lCq3#m+x|ve@~NG`iGsuQ`GjA=r8v)l((Nt9jW*kJrI6s5Nx7mVCwTDNnpNq}f$Sxq1udar9L_I6C^mGGQ&g#BmXeYd&qUTG~Uu z-M%m*j*s>1T2aOPXSa3eanEMA@ccl-LE@8VZJg)hA9f~)vH4HibNml%UHVP;GTl5h zJ@-WA{lyc-Tyo4?A1Id-8@gMV|CnHYT$9AJUe%1;A8T!KIy7rz8+MInP|cyHgP<*Z k=1PbABkq(psrD?EqVA**EKY)*81Ijm&rRi=kCzty7n{FMT>t<8 literal 0 HcmV?d00001 diff --git a/GIGA/Assets.xcassets/maskTime/exerc_answer_option_sel.imageset/Contents.json b/GIGA/Assets.xcassets/maskTime/exerc_answer_option_sel.imageset/Contents.json new file mode 100644 index 0000000..7234bb0 --- /dev/null +++ b/GIGA/Assets.xcassets/maskTime/exerc_answer_option_sel.imageset/Contents.json @@ -0,0 +1,18 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "exerc_answer_option_sel@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "exerc_answer_option_sel@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/GIGA/Assets.xcassets/maskTime/exerc_answer_option_sel.imageset/exerc_answer_option_sel@2x.png b/GIGA/Assets.xcassets/maskTime/exerc_answer_option_sel.imageset/exerc_answer_option_sel@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..afeab26888e7bba6bdb97aaad1c498476d6bee8e GIT binary patch literal 1678 zcmeAS@N?(olHy`uVBq!ia0vp^Mj*_=1|;R|J2nC-$r9IylHmNblJdl&R0hY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>b7M374h>f=cKilzMH+bJsxp0NM0=~A>u?u-676jr=qPa=OnDO zI;~?i-`aFj$h6=YX$6y42d}!*-XS$>h32<2s$r!;zI+wl?KiHnW>)?a_^o9gk$l`! k@OwKWBJq9PW6#9Ha9w=SlizDUHG*mgPgg&ebxsLQ0NZ7G>i_@% literal 0 HcmV?d00001 diff --git a/GIGA/Assets.xcassets/maskTime/exerc_answer_option_sel.imageset/exerc_answer_option_sel@3x.png b/GIGA/Assets.xcassets/maskTime/exerc_answer_option_sel.imageset/exerc_answer_option_sel@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..e0ccd9a4b7468cc49675d93f39015555eaa1a5d4 GIT binary patch literal 2533 zcmaJ@dpMNa8lQvQO1Whp)G@{_!fT#FplUiMcd0F5@z;6*=rmE)}90 zyHY!{JwgYAM21dn9FbdTM7G?-|v0b`@U;EUxtsjtBSIY zG5`Qjad*S|N=MJFS5aR2we^mjk`CHj9D#e78N!VwvZ(+^3X?iFR9`BQ!aLPL zwF3ZT^=WB9 z9)@Q*Q^RO(v25z$SZ_aaY&aQ30Xf(M?PAbU0XmgS1jf)K7#wsA2J~4MEuC+fp&;OA z2sa!9`ZFj3-UsN+WK)4i3nYXLgIfV@P!@0`+{zYi4n)AktoG!z;g9c>Y9X~ATNLg6SB3JOC&5eSGB0pai%Tw)A_ z!7_I_s+}gYzX#(u6@{h%6}F0=BiKZ6F^1 z|DkmHS2Ty~OZ^t_{}kr<@mN%-FO|cLWRsu?sYEW5?Z;$BY-iCYjLBtk z!k8?evor9(Q5u87jOLhrhU4*QcLs+`WRR)uSPV!iU_ql%&@h;_H5Lc6f}?NnV z>x^@Dc1FMuSZgbkjiv227t16^(y0vYHka~^i~KHks}txfsb?&eO^c#ZT-Z!H@biw* zwC~4)_^#d;F6H~NSbmoal?DUds_TE%dD|pyo~`NEu9Ysn_C1v$ZFaV_tCxyGX#jwH zfIHUFFJ@pmFepOvh-O1zXnigtdXS+3|B&xNyOrXEj|dPBC?q%;=m(gW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proj/LaunchScreen.storyboard b/GIGA/Base.lproj/LaunchScreen.storyboard index 722ce1c..fa689fa 100644 --- a/GIGA/Base.lproj/LaunchScreen.storyboard +++ b/GIGA/Base.lproj/LaunchScreen.storyboard @@ -1,12 +1,11 @@ - + - @@ -14,11 +13,13 @@ + + + + - - diff --git a/GIGA/Base.lproj/Main.storyboard b/GIGA/Base.lproj/Main.storyboard index d7c78a1..6bad06e 100644 --- a/GIGA/Base.lproj/Main.storyboard +++ b/GIGA/Base.lproj/Main.storyboard @@ -1,20 +1,26 @@ - + + + + - - + + - + + + + + - diff --git a/GIGA/Category/NSString+MD5.h b/GIGA/Category/NSString+MD5.h new file mode 100644 index 0000000..03ee5d5 --- /dev/null +++ b/GIGA/Category/NSString+MD5.h @@ -0,0 +1,14 @@ +// +// NSString+MD5.h +// GIGA +// +// Created by lianxiang on 2018/8/23. +// Copyright © 2018年 com.giga.ios. All rights reserved. +// + +#import + +@interface NSString (MD5) +//MD5加密 +- (NSString *)MD5; +@end diff --git a/GIGA/Category/NSString+MD5.m b/GIGA/Category/NSString+MD5.m new file mode 100644 index 0000000..df44e95 --- /dev/null +++ b/GIGA/Category/NSString+MD5.m @@ -0,0 +1,30 @@ +// +// NSString+MD5.m +// GIGA +// +// Created by lianxiang on 2018/8/23. +// Copyright © 2018年 com.giga.ios. All rights reserved. +// + +#import "NSString+MD5.h" +#import +@implementation NSString (MD5) +//MD5加密 +- (NSString *)MD5{ + + const char *ptr = [self UTF8String]; + + unsigned char md5Buffer[CC_MD5_DIGEST_LENGTH]; + + CC_MD5(ptr, (unsigned int)strlen(ptr), md5Buffer); + + NSMutableString *output = [NSMutableString stringWithCapacity:CC_MD5_DIGEST_LENGTH *2]; + for (int i = 0; i -@interface GiGaBaseViewController : UIViewController +@interface GiGaBaseViewController : UIViewController { - UIView *emptyView; + UIView *_emptyView; + UIView *_noNetWorkView; } -//- (void)setNavigationViewWithBGColor:(UIColor *)bgColor TitleColor:(UIColor *)titleColor; -//- (void)setNavigationViewHidden:(BOOL)hidden; -//- (void)addBackButtonWithImageName:(NSString *)imageName; -//- (void)setBackButtonHidden:(BOOL)hidden; -//- (void)setNavigationViewBottomLineHidden:(BOOL)hidden; -// -//- (void)addRightButtonWithBGImageName:(NSString *)rightImageName action:(SEL)rightAction; -// -//- (void)addRefreshHeaderFooterForTableView:(UITableView *)tableView -// refreshHeaderSelector:(SEL)refreshHeaderSelector -// refreshFooterSelector:(SEL)refreshFooterSelector; +@property (nonatomic,strong) UIView * emptyView; +@property (nonatomic,strong) UIView * noNetWorkView; + +@property (nonatomic,strong) UITableView *tableView; + +//网络改变回调Block,-1未知、0无网络、1蜂窝数据网络、2WiFi +@property (nonatomic, copy) void(^ network)(AFNetworkReachabilityStatus status); +//当前网络状态,-1未知、0无网络、1蜂窝数据网络、2WiFi +@property (nonatomic, assign) AFNetworkReachabilityStatus currentNetworkStatus; + +- (void)showNoNetWorkView; +- (void)showEmptyView; + +-(void)addNavTitile:(NSString *)title; @end diff --git a/GIGA/Common/BaseVC/GiGaBaseViewController.m b/GIGA/Common/BaseVC/GiGaBaseViewController.m index 0177315..c1fd5df 100644 --- a/GIGA/Common/BaseVC/GiGaBaseViewController.m +++ b/GIGA/Common/BaseVC/GiGaBaseViewController.m @@ -7,6 +7,8 @@ // #import "GiGaBaseViewController.h" +#import "UIView+Toast.h" +#import "GiGaNavTitileView.h" @interface GiGaBaseViewController () { @@ -15,6 +17,7 @@ // SEL _rightBtnAction; // SEL _refreshHeaderSelector; // SEL _refreshFooterSelector; + } @end @@ -24,21 +27,87 @@ - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. + [self.view addSubview:_tableView]; + [self testNetworkStatus]; } +-(void)addNavTitile:(NSString *)title{ + + self.navigationItem.titleView = [[GiGaNavTitileView alloc] initWithString:title frame:CGRectMake(0, 0, 200, 44)]; + +} + +//没有网络返回 +- (void)showNoNetWorkView +{ +// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ +// if (self.currentNetworkStatus < 1) { +// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ +// +// }); +// } +// }); +} + +-(void)showEmptyView{ + +} + +-(void)testNetworkStatus{ + AFNetworkReachabilityManager *manager = [AFNetworkReachabilityManager sharedManager]; + weakify(self); + [manager setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) { + weakSelf.currentNetworkStatus = status; + if (weakSelf.network) weakSelf.network(status); + switch (status) { + case AFNetworkReachabilityStatusNotReachable: + + [[UIApplication sharedApplication].keyWindow makeToast:@"哎呀,没有网络啦~"duration:1.6 position:CSToastPositionCenter]; + + break; + + default: + break; + } + }] ; + //开始检测 + [manager startMonitoring]; +} + +//显示信息,并在设定延时后返回上级界面 +- (void)backWithShowMessage:(NSString *)message afterDelay:(CGFloat)delay +{ + [[UIApplication sharedApplication].keyWindow makeToast:message duration:1.6 position:CSToastPositionCenter]; + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delay * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + [self back]; + }); +} +- (void)back +{ + [self.navigationController popViewControllerAnimated:YES]; +} + +-(UITableView*)tableView{ + + if (!_tableView) { + + _tableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStyleGrouped]; + } + + return _tableView; +} - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. +- (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath { + return 0; } -*/ + +- (NSInteger)tableView:(nonnull UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return 0; +} + @end diff --git a/GIGA/Common/GiGaHelper.h b/GIGA/Common/GiGaHelper.h index 0321b5f..b4ed7a7 100644 --- a/GIGA/Common/GiGaHelper.h +++ b/GIGA/Common/GiGaHelper.h @@ -38,4 +38,8 @@ */ +(NSString *)stringWithNSTimerinterval:(NSTimeInterval)interval; +//计算文字的长度 ++ (CGSize)sizeWithText:(NSString *)text font:(UIFont *)font maxSize:(CGSize)maxSize; + + @end diff --git a/GIGA/Common/GiGaHelper.m b/GIGA/Common/GiGaHelper.m index d890eeb..d45cb09 100644 --- a/GIGA/Common/GiGaHelper.m +++ b/GIGA/Common/GiGaHelper.m @@ -68,5 +68,10 @@ } +//计算文字的长度 ++ (CGSize)sizeWithText:(NSString *)text font:(UIFont *)font maxSize:(CGSize)maxSize +{ + return [text boundingRectWithSize:maxSize options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:font} context:nil].size; +} @end diff --git a/GIGA/Common/GiGaNavTitileView/GiGaNavTitileView.h b/GIGA/Common/GiGaNavTitileView/GiGaNavTitileView.h new file mode 100644 index 0000000..2eaf0ab --- /dev/null +++ b/GIGA/Common/GiGaNavTitileView/GiGaNavTitileView.h @@ -0,0 +1,13 @@ +// +// GiGaNavTitileView.h +// GIGA +// +// Created by lianxiang on 2018/8/23. +// Copyright © 2018年 com.giga.ios. All rights reserved. +// + +#import + +@interface GiGaNavTitileView : UIView +- (id)initWithString:(NSString *)str frame:(CGRect)frame; +@end diff --git a/GIGA/Common/GiGaNavTitileView/GiGaNavTitileView.m b/GIGA/Common/GiGaNavTitileView/GiGaNavTitileView.m new file mode 100644 index 0000000..e6acebf --- /dev/null +++ b/GIGA/Common/GiGaNavTitileView/GiGaNavTitileView.m @@ -0,0 +1,28 @@ +// +// GiGaNavTitileView.m +// GIGA +// +// Created by lianxiang on 2018/8/23. +// Copyright © 2018年 com.giga.ios. All rights reserved. +// + +#import "GiGaNavTitileView.h" + +@implementation GiGaNavTitileView + +- (id)initWithString:(NSString *)str frame:(CGRect)frame +{ + if (self = [super initWithFrame:frame]) { + UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, 44)]; + label.textColor = [UIColor redColor]; + label.text = str; + label.font = [UIFont boldSystemFontOfSize:18.0f]; + label.textAlignment = NSTextAlignmentCenter; + [self addSubview:label]; + } + + return self; +} + + +@end diff --git a/GIGA/GIGA.pch b/GIGA/GIGA.pch index 412506b..8428bb5 100644 --- a/GIGA/GIGA.pch +++ b/GIGA/GIGA.pch @@ -12,6 +12,8 @@ // Include any system framework and library headers here that should be included in all compilation units. // You will also need to set the Prefix Header build setting of one or more of your targets to reference this file. #import "GIGA.h" +#import "AFNetworking.h" +#import "UIView+Toast.h" #ifdef DEBUG #define GILog(fmt,...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__) diff --git a/GIGA/Info.plist b/GIGA/Info.plist index 6183edb..94c9d30 100644 --- a/GIGA/Info.plist +++ b/GIGA/Info.plist @@ -29,6 +29,7 @@ UIBackgroundModes + audio remote-notification UILaunchStoryboardName diff --git a/GIGA/Modules/AppAD/GiGaStartAdView/GiGaStartAdView.h b/GIGA/Modules/AppAD/GiGaStartAdView/GiGaStartAdView.h index e082018..ea6deab 100644 --- a/GIGA/Modules/AppAD/GiGaStartAdView/GiGaStartAdView.h +++ b/GIGA/Modules/AppAD/GiGaStartAdView/GiGaStartAdView.h @@ -14,6 +14,7 @@ static NSString *const kAdUrlKey = @"adUrl"; @interface GiGaStartAdView : UIView @property (nonatomic,strong) UIImageView *adView; + /** 显示启动页广告 */ diff --git a/GIGA/Modules/AppAD/GiGaStartAdView/GiGaStartAdView.m b/GIGA/Modules/AppAD/GiGaStartAdView/GiGaStartAdView.m index 3df7e21..ea716fc 100644 --- a/GIGA/Modules/AppAD/GiGaStartAdView/GiGaStartAdView.m +++ b/GIGA/Modules/AppAD/GiGaStartAdView/GiGaStartAdView.m @@ -16,9 +16,8 @@ @property (nonatomic,strong) NSTimer *countTimer; @property (nonatomic,assign) int count; - @end -static int const showTime = 12; +static int const showTime = 5; @implementation GiGaStartAdView @@ -51,7 +50,8 @@ static int const showTime = 12; [_adView addGestureRecognizer:tap]; CGFloat btnW = 60; CGFloat btnH = 30; - _countBtn = [[UIButton alloc] initWithFrame:CGRectMake(KMainW - btnW - 24, btnH, btnW, btnH)]; + _countBtn = [[UIButton alloc] initWithFrame:CGRectMake(KMainW - btnW - 24, btnH + 10, btnW, btnH)]; + [_countBtn addTarget:self action:@selector(removeAdView) forControlEvents:UIControlEventTouchUpInside]; [_countBtn setTitle:[NSString stringWithFormat:@"跳过%d",showTime] forState:UIControlStateNormal]; _countBtn.titleLabel.font = [UIFont systemFontOfSize:15]; @@ -76,10 +76,8 @@ static int const showTime = 12; } -(void)gotoAd{ - [self removeAdView]; NC_POST_NAME_OBJECT(APP_PUSHTO_DETAILVIEW, nil); - } -(void)countDown{ diff --git a/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.xib b/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.xib index bbacb44..90c5348 100644 --- a/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.xib +++ b/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.xib @@ -1,5 +1,5 @@ - + @@ -7,7 +7,6 @@ - @@ -29,7 +28,7 @@ - + @@ -37,7 +36,7 @@ - + @@ -46,7 +45,7 @@ - + @@ -55,7 +54,7 @@ - + @@ -64,28 +63,28 @@ - + - + - + - + - + - + - - + + - - + + - - + + - + - diff --git a/GIGA/Modules/LogIn/Controller/GiGaUserLoginVC.m b/GIGA/Modules/LogIn/Controller/GiGaUserLoginVC.m index 9fb2a7a..b72ea8f 100644 --- a/GIGA/Modules/LogIn/Controller/GiGaUserLoginVC.m +++ b/GIGA/Modules/LogIn/Controller/GiGaUserLoginVC.m @@ -112,7 +112,7 @@ #pragma mark - 登录 -(void)loginBtnAction:(UIButton *)btn{ [GiGaUserDefault saveUserId:@"123"]; - + [self dismissViewControllerAnimated:YES completion:nil]; } @end diff --git a/GIGA/Modules/LogIn/Controller/GiGaUserLoginVC.xib b/GIGA/Modules/LogIn/Controller/GiGaUserLoginVC.xib index 6aab7b9..17b9337 100644 --- a/GIGA/Modules/LogIn/Controller/GiGaUserLoginVC.xib +++ b/GIGA/Modules/LogIn/Controller/GiGaUserLoginVC.xib @@ -1,5 +1,5 @@ - + @@ -7,7 +7,6 @@ - @@ -28,7 +27,7 @@ - + @@ -36,7 +35,7 @@ - + @@ -46,7 +45,7 @@ - + @@ -56,21 +55,21 @@ - + - + - + - +