Author SHA1 Message Date
lianxiang d845ed2cb0 add 2018-10-19 20:23:26 +08:00
练练 e06dc32099 add 2018-10-19 12:02:14 +08:00
lianxiang 52222aa995 fix 2018-10-18 17:02:29 +08:00
lianxiang 94ce6d3e14 new login style 2018-10-15 19:26:07 +08:00
lianxiang 71f6176cea 0.9.0 2018-10-15 10:53:00 +08:00
lianxiang 97af177b88 add 2018-10-12 09:12:54 +08:00
lianxiang dc1b1e330f fix 2018-10-09 09:02:59 +08:00
lianxiang 431a19b043 修改手机验证码触发逻辑 2018-09-30 16:08:50 +08:00
lianxiang ea869e7b42 意见反馈相册权限bug 2018-09-30 11:04:16 +08:00
104 changed files with 2390 additions and 677 deletions
+83 -49
View File
@@ -11,19 +11,23 @@
83048481214F489000603CE7 /* GiGaUserJobViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 83048480214F488F00603CE7 /* GiGaUserJobViewCell.m */; };
83048486214FACE700603CE7 /* JobMaskButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 83048485214FACE700603CE7 /* JobMaskButton.m */; };
8314D2112133ABE500B458BF /* WeiIXinApiManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 8314D2102133ABE500B458BF /* WeiIXinApiManager.m */; };
83276187216F29A800C6216C /* LXCustomActionSheet.m in Sources */ = {isa = PBXBuildFile; fileRef = 83276185216F29A800C6216C /* LXCustomActionSheet.m */; };
83319C852174376C005EF726 /* AppDelegate+ThirdParty.m in Sources */ = {isa = PBXBuildFile; fileRef = 83319C812174376B005EF726 /* AppDelegate+ThirdParty.m */; };
83319C862174376C005EF726 /* AppDelegate+GiGaConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 83319C822174376C005EF726 /* AppDelegate+GiGaConfig.m */; };
83319C87217437E0005EF726 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8361B3CA212155C200238FEB /* AppDelegate.m */; };
83346AC0212BB50A0054D597 /* PassWordResetVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 83346ABE212BB50A0054D597 /* PassWordResetVC.m */; };
83346AC1212BB50A0054D597 /* PassWordResetVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 83346ABF212BB50A0054D597 /* PassWordResetVC.xib */; };
83346AC5212BBC8C0054D597 /* GiGaRegistViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83346AC3212BBC8C0054D597 /* GiGaRegistViewController.m */; };
83346AC6212BBC8C0054D597 /* GiGaRegistViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 83346AC4212BBC8C0054D597 /* GiGaRegistViewController.xib */; };
83346ACE212BD7830054D597 /* GiGaWebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83346ACC212BD7830054D597 /* GiGaWebViewController.m */; };
83346ACF212BD7830054D597 /* GiGaWebViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 83346ACD212BD7830054D597 /* GiGaWebViewController.xib */; };
83346AD1212BF5B70054D597 /* useragreement.html in Resources */ = {isa = PBXBuildFile; fileRef = 83346AD0212BF5B70054D597 /* useragreement.html */; };
83346AD4212BFF6E0054D597 /* UserGuardViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83346AD3212BFF6E0054D597 /* UserGuardViewController.m */; };
83346AD7212C18F50054D597 /* GiGaAppGaurdVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 83346AD6212C18F50054D597 /* GiGaAppGaurdVC.m */; };
83379D0B217033A800986278 /* GiGaLoaclImageModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 83379D0A217033A800986278 /* GiGaLoaclImageModel.m */; };
83379D0E21703CC100986278 /* GIGaSharePageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83379D0D21703CC100986278 /* GIGaSharePageViewController.m */; };
8338F6B12142182200B4780B /* MaskTime.png in Resources */ = {isa = PBXBuildFile; fileRef = 8338F6B02142182100B4780B /* MaskTime.png */; };
8338F6B92142504E00B4780B /* LXCustomSwith.m in Sources */ = {isa = PBXBuildFile; fileRef = 8338F6B82142504E00B4780B /* LXCustomSwith.m */; };
833DA7762122A62000A5C614 /* GiGaMaskTaskViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 833DA7752122A62000A5C614 /* GiGaMaskTaskViewController.m */; };
833DE8E52150169F009D4329 /* JYAddressPicker.m in Sources */ = {isa = PBXBuildFile; fileRef = 833DE8E32150169F009D4329 /* JYAddressPicker.m */; };
8340BF9E213E3846008F22E4 /* SHineLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8340BF9D213E3846008F22E4 /* SHineLabel.m */; };
8340BFA2213E60DD008F22E4 /* GIGAMBHUDHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 8340BFA1213E60DD008F22E4 /* GIGAMBHUDHelper.m */; };
8340BFA6213E6514008F22E4 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8340BFA5213E6514008F22E4 /* Localizable.strings */; };
@@ -45,13 +49,11 @@
834415F3215B5F8200A6D906 /* GiGaShareModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 834415F2215B5F8200A6D906 /* GiGaShareModel.m */; };
834415F6215B89A300A6D906 /* MaskTimeTopAnimationView.m in Sources */ = {isa = PBXBuildFile; fileRef = 834415F5215B89A300A6D906 /* MaskTimeTopAnimationView.m */; };
8345C13621414D3B00051717 /* NSString+Unicode.m in Sources */ = {isa = PBXBuildFile; fileRef = 8345C13521414D3B00051717 /* NSString+Unicode.m */; };
8349585C212511040064DB6C /* AppDelegate+ThirdParty.m in Sources */ = {isa = PBXBuildFile; fileRef = 8349585B212511040064DB6C /* AppDelegate+ThirdParty.m */; };
834BDA48215C7D10001E1DB7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 834BDA47215C7D0F001E1DB7 /* InfoPlist.strings */; };
834DA5A5215F5F3B003FC4C6 /* ShareViewSystemImageHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 834DA5A4215F5F3B003FC4C6 /* ShareViewSystemImageHelper.m */; };
834DA5A8215F5FE0003FC4C6 /* ShareCustomIamgeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 834DA5A7215F5FE0003FC4C6 /* ShareCustomIamgeModel.m */; };
834DA5AB215F6840003FC4C6 /* JobModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 834DA5AA215F6840003FC4C6 /* JobModel.m */; };
835060A2212D1225007E6220 /* GiGaMeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 835060A1212D1225007E6220 /* GiGaMeViewController.m */; };
835060A5212D3536007E6220 /* AppDelegate+GiGaConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 8361B40A21217B2100238FEB /* AppDelegate+GiGaConfig.m */; };
835060A9212D38EE007E6220 /* GiGaStartAdView.m in Sources */ = {isa = PBXBuildFile; fileRef = 835060A8212D38EE007E6220 /* GiGaStartAdView.m */; };
835060AD212D4D0C007E6220 /* GiGaFileNanager.m in Sources */ = {isa = PBXBuildFile; fileRef = 835060AC212D4D0C007E6220 /* GiGaFileNanager.m */; };
835060B3212D54C2007E6220 /* GiGaAdDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 835060B2212D54C2007E6220 /* GiGaAdDetailViewController.m */; };
@@ -72,7 +74,8 @@
8357ADD32123C7C6000816F2 /* GiGaAPIResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 8357ADD22123C7C6000816F2 /* GiGaAPIResult.m */; };
8357ADD52123F5EC000816F2 /* libsqlite3.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 8357ADD42123F5EC000816F2 /* libsqlite3.tbd */; };
8357ADD82124027D000816F2 /* GiGaUserDefault.m in Sources */ = {isa = PBXBuildFile; fileRef = 8357ADD72124027D000816F2 /* GiGaUserDefault.m */; };
8361B3CB212155C200238FEB /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8361B3CA212155C200238FEB /* AppDelegate.m */; };
835A0EAC216AF03C00ABAB1C /* GiGaPageControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 835A0EAB216AF03C00ABAB1C /* GiGaPageControl.m */; };
835A0EAF216AFDC300ABAB1C /* LXPageControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 835A0EAE216AFDC300ABAB1C /* LXPageControl.m */; };
8361B3CE212155C200238FEB /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8361B3CD212155C200238FEB /* ViewController.m */; };
8361B3D1212155C200238FEB /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8361B3CF212155C200238FEB /* Main.storyboard */; };
8361B3D3212155C300238FEB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8361B3D2212155C300238FEB /* Assets.xcassets */; };
@@ -102,7 +105,6 @@
836EE5D7213645E300F0ABB2 /* GiGaBaseAPiRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 836EE5D6213645E300F0ABB2 /* GiGaBaseAPiRequest.m */; };
836EE5DA2136716100F0ABB2 /* NSTimer+Convenience.m in Sources */ = {isa = PBXBuildFile; fileRef = 836EE5D82136716000F0ABB2 /* NSTimer+Convenience.m */; };
8376B81E2154897700AB79F8 /* GIGaUserFileHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 8376B81D2154897700AB79F8 /* GIGaUserFileHelper.m */; };
8376B8202154913E00AB79F8 /* city.json in Resources */ = {isa = PBXBuildFile; fileRef = 8376B81F2154913E00AB79F8 /* city.json */; };
8376B8232154927300AB79F8 /* GIGaMaskShareViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8376B8222154927300AB79F8 /* GIGaMaskShareViewController.m */; };
8376B8282154A0A200AB79F8 /* MaskTimeEndViewImgaeCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8376B8262154A0A200AB79F8 /* MaskTimeEndViewImgaeCell.m */; };
8376B8292154A0A200AB79F8 /* MaskTimeEndViewImgaeCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8376B8272154A0A200AB79F8 /* MaskTimeEndViewImgaeCell.xib */; };
@@ -171,7 +173,6 @@
838388C8212F9C4200D14C53 /* GiGaLocalNotificationManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 838388C7212F9C4200D14C53 /* GiGaLocalNotificationManager.m */; };
838388D3212FB7D700D14C53 /* JXTAlertController.m in Sources */ = {isa = PBXBuildFile; fileRef = 838388CE212FB7D700D14C53 /* JXTAlertController.m */; };
838388D4212FB7D700D14C53 /* JXTAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = 838388D2212FB7D700D14C53 /* JXTAlertView.m */; };
838388DA2130046D00D14C53 /* emojizone.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = 838388D92130046D00D14C53 /* emojizone.mp4 */; };
8384643E214A484400F12B33 /* MaskTestResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 8384643D214A484400F12B33 /* MaskTestResult.m */; };
83846441214A4BFF00F12B33 /* MaskTestResultVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 83846440214A4BFF00F12B33 /* MaskTestResultVC.m */; };
8384F0E821533528002C19F0 /* MaskResultPercentCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8384F0E721533528002C19F0 /* MaskResultPercentCell.m */; };
@@ -189,6 +190,9 @@
838762E3214B9F580039D241 /* GiGaUserSexViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 838762E1214B9F580039D241 /* GiGaUserSexViewCell.xib */; };
838762E7214B9FA60039D241 /* GIGaUserCityViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 838762E5214B9FA60039D241 /* GIGaUserCityViewCell.m */; };
838762E8214B9FA60039D241 /* GIGaUserCityViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 838762E6214B9FA60039D241 /* GIGaUserCityViewCell.xib */; };
838CD5972179E11E000CBEA6 /* GIGaDateHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 838CD5962179E11E000CBEA6 /* GIGaDateHelper.m */; };
838CD5A22179E79C000CBEA6 /* city.json in Resources */ = {isa = PBXBuildFile; fileRef = 838CD5A02179E79C000CBEA6 /* city.json */; };
838CD5A32179E79C000CBEA6 /* JYAddressPicker.m in Sources */ = {isa = PBXBuildFile; fileRef = 838CD5A12179E79C000CBEA6 /* JYAddressPicker.m */; };
8390116B214E20B2004CA790 /* LYSDateContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = 83901145214E20B1004CA790 /* LYSDateContentView.m */; };
8390116C214E20B2004CA790 /* LYSDatePopViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83901149214E20B1004CA790 /* LYSDatePopViewController.m */; };
8390116D214E20B2004CA790 /* LYSDateBaseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83901151214E20B1004CA790 /* LYSDateBaseViewController.m */; };
@@ -240,6 +244,7 @@
83C78A15215873170083DDD9 /* MaskHistoryListViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 83C78A13215873170083DDD9 /* MaskHistoryListViewCell.xib */; };
83C78A192159D74D0083DDD9 /* UIImage+LogoQrCode.m in Sources */ = {isa = PBXBuildFile; fileRef = 83C78A182159D74D0083DDD9 /* UIImage+LogoQrCode.m */; };
83C78A1C2159DD920083DDD9 /* UIImage+ShotImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 83C78A1B2159DD920083DDD9 /* UIImage+ShotImage.m */; };
83D0B92C216C5A80006B77DC /* ogg_btn.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 83D0B92B216C5A80006B77DC /* ogg_btn.mp3 */; };
83D3832D215A2CF5009E8669 /* MaskHistryRecord.m in Sources */ = {isa = PBXBuildFile; fileRef = 83D3832C215A2CF5009E8669 /* MaskHistryRecord.m */; };
83E40B2F21218BA0008149C4 /* GiGaUserViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83E40B2E21218BA0008149C4 /* GiGaUserViewController.m */; };
/* End PBXBuildFile section */
@@ -270,6 +275,12 @@
8314D20F2133ABE500B458BF /* WeiIXinApiManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WeiIXinApiManager.h; sourceTree = "<group>"; };
8314D2102133ABE500B458BF /* WeiIXinApiManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WeiIXinApiManager.m; sourceTree = "<group>"; };
8314D2122133F44600B458BF /* MobClickList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MobClickList.h; sourceTree = "<group>"; };
83276185216F29A800C6216C /* LXCustomActionSheet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LXCustomActionSheet.m; sourceTree = "<group>"; };
83276186216F29A800C6216C /* LXCustomActionSheet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LXCustomActionSheet.h; sourceTree = "<group>"; };
83319C812174376B005EF726 /* AppDelegate+ThirdParty.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "AppDelegate+ThirdParty.m"; sourceTree = "<group>"; };
83319C822174376C005EF726 /* AppDelegate+GiGaConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "AppDelegate+GiGaConfig.m"; sourceTree = "<group>"; };
83319C832174376C005EF726 /* AppDelegate+GiGaConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AppDelegate+GiGaConfig.h"; sourceTree = "<group>"; };
83319C842174376C005EF726 /* AppDelegate+ThirdParty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AppDelegate+ThirdParty.h"; sourceTree = "<group>"; };
83346ABD212BB50A0054D597 /* PassWordResetVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PassWordResetVC.h; sourceTree = "<group>"; };
83346ABE212BB50A0054D597 /* PassWordResetVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PassWordResetVC.m; sourceTree = "<group>"; };
83346ABF212BB50A0054D597 /* PassWordResetVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PassWordResetVC.xib; sourceTree = "<group>"; };
@@ -279,18 +290,19 @@
83346ACB212BD7830054D597 /* GiGaWebViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaWebViewController.h; sourceTree = "<group>"; };
83346ACC212BD7830054D597 /* GiGaWebViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaWebViewController.m; sourceTree = "<group>"; };
83346ACD212BD7830054D597 /* GiGaWebViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GiGaWebViewController.xib; sourceTree = "<group>"; };
83346AD0212BF5B70054D597 /* useragreement.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = useragreement.html; sourceTree = "<group>"; };
83346AD2212BFF6E0054D597 /* UserGuardViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UserGuardViewController.h; sourceTree = "<group>"; };
83346AD3212BFF6E0054D597 /* UserGuardViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UserGuardViewController.m; sourceTree = "<group>"; };
83346AD5212C18F50054D597 /* GiGaAppGaurdVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaAppGaurdVC.h; sourceTree = "<group>"; };
83346AD6212C18F50054D597 /* GiGaAppGaurdVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaAppGaurdVC.m; sourceTree = "<group>"; };
83379D09217033A800986278 /* GiGaLoaclImageModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaLoaclImageModel.h; sourceTree = "<group>"; };
83379D0A217033A800986278 /* GiGaLoaclImageModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaLoaclImageModel.m; sourceTree = "<group>"; };
83379D0C21703CC100986278 /* GIGaSharePageViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GIGaSharePageViewController.h; sourceTree = "<group>"; };
83379D0D21703CC100986278 /* GIGaSharePageViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GIGaSharePageViewController.m; sourceTree = "<group>"; };
8338F6B02142182100B4780B /* MaskTime.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = MaskTime.png; sourceTree = "<group>"; };
8338F6B72142504E00B4780B /* LXCustomSwith.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LXCustomSwith.h; sourceTree = "<group>"; };
8338F6B82142504E00B4780B /* LXCustomSwith.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LXCustomSwith.m; sourceTree = "<group>"; };
833DA7742122A62000A5C614 /* GiGaMaskTaskViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaMaskTaskViewController.h; sourceTree = "<group>"; };
833DA7752122A62000A5C614 /* GiGaMaskTaskViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaMaskTaskViewController.m; sourceTree = "<group>"; };
833DE8E12150169F009D4329 /* JYAddressPicker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JYAddressPicker.h; sourceTree = "<group>"; };
833DE8E32150169F009D4329 /* JYAddressPicker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JYAddressPicker.m; sourceTree = "<group>"; };
8340BF9C213E3846008F22E4 /* SHineLabel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SHineLabel.h; sourceTree = "<group>"; };
8340BF9D213E3846008F22E4 /* SHineLabel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SHineLabel.m; sourceTree = "<group>"; };
8340BFA0213E60DD008F22E4 /* GIGAMBHUDHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GIGAMBHUDHelper.h; sourceTree = "<group>"; };
@@ -327,8 +339,6 @@
834415F5215B89A300A6D906 /* MaskTimeTopAnimationView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MaskTimeTopAnimationView.m; sourceTree = "<group>"; };
8345C13421414D3B00051717 /* NSString+Unicode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSString+Unicode.h"; sourceTree = "<group>"; };
8345C13521414D3B00051717 /* NSString+Unicode.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSString+Unicode.m"; sourceTree = "<group>"; };
8349585A212511040064DB6C /* AppDelegate+ThirdParty.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "AppDelegate+ThirdParty.h"; sourceTree = "<group>"; };
8349585B212511040064DB6C /* AppDelegate+ThirdParty.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "AppDelegate+ThirdParty.m"; sourceTree = "<group>"; };
834BDA47215C7D0F001E1DB7 /* InfoPlist.strings */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; path = InfoPlist.strings; sourceTree = "<group>"; };
834DA5A3215F5F3B003FC4C6 /* ShareViewSystemImageHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ShareViewSystemImageHelper.h; sourceTree = "<group>"; };
834DA5A4215F5F3B003FC4C6 /* ShareViewSystemImageHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ShareViewSystemImageHelper.m; sourceTree = "<group>"; };
@@ -374,6 +384,10 @@
8357ADD42123F5EC000816F2 /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = usr/lib/libsqlite3.tbd; sourceTree = SDKROOT; };
8357ADD62124027D000816F2 /* GiGaUserDefault.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaUserDefault.h; sourceTree = "<group>"; };
8357ADD72124027D000816F2 /* GiGaUserDefault.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaUserDefault.m; sourceTree = "<group>"; };
835A0EAA216AF03C00ABAB1C /* GiGaPageControl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaPageControl.h; sourceTree = "<group>"; };
835A0EAB216AF03C00ABAB1C /* GiGaPageControl.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaPageControl.m; sourceTree = "<group>"; };
835A0EAD216AFDC300ABAB1C /* LXPageControl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LXPageControl.h; sourceTree = "<group>"; };
835A0EAE216AFDC300ABAB1C /* LXPageControl.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LXPageControl.m; sourceTree = "<group>"; };
8361B3C6212155C200238FEB /* GIGA.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GIGA.app; sourceTree = BUILT_PRODUCTS_DIR; };
8361B3C9212155C200238FEB /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
8361B3CA212155C200238FEB /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
@@ -396,8 +410,6 @@
8361B40321215E0C00238FEB /* LXCountTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LXCountTimer.h; sourceTree = "<group>"; };
8361B40521215E6F00238FEB /* GiGaHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaHelper.h; sourceTree = "<group>"; };
8361B40621215E6F00238FEB /* GiGaHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaHelper.m; sourceTree = "<group>"; };
8361B40921217B2100238FEB /* AppDelegate+GiGaConfig.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "AppDelegate+GiGaConfig.h"; sourceTree = "<group>"; };
8361B40A21217B2100238FEB /* AppDelegate+GiGaConfig.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "AppDelegate+GiGaConfig.m"; sourceTree = "<group>"; };
8361B40C21217C8200238FEB /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; };
8361B40E21217C9100238FEB /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; };
8361B41021217CA100238FEB /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; };
@@ -426,7 +438,6 @@
836EE5D92136716000F0ABB2 /* NSTimer+Convenience.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSTimer+Convenience.h"; sourceTree = "<group>"; };
8376B81C2154897700AB79F8 /* GIGaUserFileHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GIGaUserFileHelper.h; sourceTree = "<group>"; };
8376B81D2154897700AB79F8 /* GIGaUserFileHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GIGaUserFileHelper.m; sourceTree = "<group>"; };
8376B81F2154913E00AB79F8 /* city.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = city.json; sourceTree = "<group>"; };
8376B8212154927300AB79F8 /* GIGaMaskShareViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GIGaMaskShareViewController.h; sourceTree = "<group>"; };
8376B8222154927300AB79F8 /* GIGaMaskShareViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GIGaMaskShareViewController.m; sourceTree = "<group>"; };
8376B8252154A0A200AB79F8 /* MaskTimeEndViewImgaeCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MaskTimeEndViewImgaeCell.h; path = GIGA/Modules/Mask/View/MaskTimeEndViewImgaeCell.h; sourceTree = SOURCE_ROOT; };
@@ -547,7 +558,6 @@
838388CF212FB7D700D14C53 /* JXTAlertManagerHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JXTAlertManagerHeader.h; sourceTree = "<group>"; };
838388D1212FB7D700D14C53 /* JXTAlertView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JXTAlertView.h; sourceTree = "<group>"; };
838388D2212FB7D700D14C53 /* JXTAlertView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JXTAlertView.m; sourceTree = "<group>"; };
838388D92130046D00D14C53 /* emojizone.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = emojizone.mp4; sourceTree = "<group>"; };
8384643C214A484400F12B33 /* MaskTestResult.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MaskTestResult.h; sourceTree = "<group>"; };
8384643D214A484400F12B33 /* MaskTestResult.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MaskTestResult.m; sourceTree = "<group>"; };
8384643F214A4BFF00F12B33 /* MaskTestResultVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MaskTestResultVC.h; sourceTree = "<group>"; };
@@ -577,6 +587,11 @@
838762E4214B9FA60039D241 /* GIGaUserCityViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GIGaUserCityViewCell.h; sourceTree = "<group>"; };
838762E5214B9FA60039D241 /* GIGaUserCityViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GIGaUserCityViewCell.m; sourceTree = "<group>"; };
838762E6214B9FA60039D241 /* GIGaUserCityViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GIGaUserCityViewCell.xib; sourceTree = "<group>"; };
838CD5952179E11D000CBEA6 /* GIGaDateHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GIGaDateHelper.h; sourceTree = "<group>"; };
838CD5962179E11E000CBEA6 /* GIGaDateHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GIGaDateHelper.m; sourceTree = "<group>"; };
838CD59F2179E79C000CBEA6 /* JYAddressPicker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JYAddressPicker.h; sourceTree = "<group>"; };
838CD5A02179E79C000CBEA6 /* city.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = city.json; sourceTree = "<group>"; };
838CD5A12179E79C000CBEA6 /* JYAddressPicker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JYAddressPicker.m; sourceTree = "<group>"; };
83901142214E04D1004CA790 /* ApiRequestConfig.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ApiRequestConfig.h; sourceTree = "<group>"; };
83901144214E20B1004CA790 /* LYSDatePickerTypeDayAndTimeDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LYSDatePickerTypeDayAndTimeDelegate.h; sourceTree = "<group>"; };
83901145214E20B1004CA790 /* LYSDateContentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LYSDateContentView.m; sourceTree = "<group>"; };
@@ -675,6 +690,7 @@
83C78A182159D74D0083DDD9 /* UIImage+LogoQrCode.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIImage+LogoQrCode.m"; sourceTree = "<group>"; };
83C78A1A2159DD920083DDD9 /* UIImage+ShotImage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIImage+ShotImage.h"; sourceTree = "<group>"; };
83C78A1B2159DD920083DDD9 /* UIImage+ShotImage.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIImage+ShotImage.m"; sourceTree = "<group>"; };
83D0B92B216C5A80006B77DC /* ogg_btn.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = ogg_btn.mp3; sourceTree = "<group>"; };
83D3832B215A2CF5009E8669 /* MaskHistryRecord.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MaskHistryRecord.h; sourceTree = "<group>"; };
83D3832C215A2CF5009E8669 /* MaskHistryRecord.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MaskHistryRecord.m; sourceTree = "<group>"; };
83E40B2D21218BA0008149C4 /* GiGaUserViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaUserViewController.h; sourceTree = "<group>"; };
@@ -732,14 +748,22 @@
name = Pods;
sourceTree = "<group>";
};
83276184216F29A800C6216C /* LXCustomActionsheet */ = {
isa = PBXGroup;
children = (
83276185216F29A800C6216C /* LXCustomActionSheet.m */,
83276186216F29A800C6216C /* LXCustomActionSheet.h */,
);
path = LXCustomActionsheet;
sourceTree = "<group>";
};
83346AC8212BD4160054D597 /* Source */ = {
isa = PBXGroup;
children = (
83D0B92B216C5A80006B77DC /* ogg_btn.mp3 */,
8338F6B02142182100B4780B /* MaskTime.png */,
8342D9FC2131150200D16B1D /* 4481.wav */,
838388D92130046D00D14C53 /* emojizone.mp4 */,
838388C3212F934400D14C53 /* pomodoSound.m4a */,
83346AD0212BF5B70054D597 /* useragreement.html */,
);
path = Source;
sourceTree = "<group>";
@@ -753,17 +777,6 @@
path = CustomSwitch;
sourceTree = "<group>";
};
833DE8E02150169F009D4329 /* JYAddressPicker */ = {
isa = PBXGroup;
children = (
8376B81F2154913E00AB79F8 /* city.json */,
833DE8E12150169F009D4329 /* JYAddressPicker.h */,
833DE8E32150169F009D4329 /* JYAddressPicker.m */,
);
name = JYAddressPicker;
path = ../../../../JYAddressPicker;
sourceTree = "<group>";
};
8340BF9F213E6080008F22E4 /* GIGAMBHUDHelper */ = {
isa = PBXGroup;
children = (
@@ -786,8 +799,9 @@
8340BFAC213E7374008F22E4 /* Views */ = {
isa = PBXGroup;
children = (
838CD59E2179E79C000CBEA6 /* JYAddressPicker */,
83276184216F29A800C6216C /* LXCustomActionsheet */,
8382DFC021564A1F00BBA5A5 /* SJPhotoPicker */,
833DE8E02150169F009D4329 /* JYAddressPicker */,
83901143214E20B1004CA790 /* LYSDatePickerController */,
8338F6B62142504E00B4780B /* CustomSwitch */,
8340BFAD213E739D008F22E4 /* GiGaNoNetWorkView.h */,
@@ -862,6 +876,8 @@
8376B8352154C74300AB79F8 /* ShareViewController.m */,
834DA5A3215F5F3B003FC4C6 /* ShareViewSystemImageHelper.h */,
834DA5A4215F5F3B003FC4C6 /* ShareViewSystemImageHelper.m */,
83379D0C21703CC100986278 /* GIGaSharePageViewController.h */,
83379D0D21703CC100986278 /* GIGaSharePageViewController.m */,
);
path = Controller;
sourceTree = "<group>";
@@ -875,6 +891,8 @@
834415F2215B5F8200A6D906 /* GiGaShareModel.m */,
834DA5A6215F5FE0003FC4C6 /* ShareCustomIamgeModel.h */,
834DA5A7215F5FE0003FC4C6 /* ShareCustomIamgeModel.m */,
83379D09217033A800986278 /* GiGaLoaclImageModel.h */,
83379D0A217033A800986278 /* GiGaLoaclImageModel.m */,
);
path = Model;
sourceTree = "<group>";
@@ -894,6 +912,10 @@
83BFAE7A213D3F3A004EF801 /* MaskTimeCircularProgressView.m */,
834415F4215B89A300A6D906 /* MaskTimeTopAnimationView.h */,
834415F5215B89A300A6D906 /* MaskTimeTopAnimationView.m */,
835A0EAA216AF03C00ABAB1C /* GiGaPageControl.h */,
835A0EAB216AF03C00ABAB1C /* GiGaPageControl.m */,
835A0EAD216AFDC300ABAB1C /* LXPageControl.h */,
835A0EAE216AFDC300ABAB1C /* LXPageControl.m */,
);
path = View;
sourceTree = "<group>";
@@ -951,6 +973,10 @@
8361B3C8212155C200238FEB /* GIGA */ = {
isa = PBXGroup;
children = (
83319C832174376C005EF726 /* AppDelegate+GiGaConfig.h */,
83319C822174376C005EF726 /* AppDelegate+GiGaConfig.m */,
83319C842174376C005EF726 /* AppDelegate+ThirdParty.h */,
83319C812174376B005EF726 /* AppDelegate+ThirdParty.m */,
835060A3212D2321007E6220 /* GIGA.entitlements */,
8361B3FF21215C9D00238FEB /* Modules */,
8361B3FE21215C8A00238FEB /* Category */,
@@ -958,10 +984,6 @@
8361B3FC21215C7400238FEB /* Common */,
8361B3C9212155C200238FEB /* AppDelegate.h */,
8361B3CA212155C200238FEB /* AppDelegate.m */,
8361B40921217B2100238FEB /* AppDelegate+GiGaConfig.h */,
8361B40A21217B2100238FEB /* AppDelegate+GiGaConfig.m */,
8349585A212511040064DB6C /* AppDelegate+ThirdParty.h */,
8349585B212511040064DB6C /* AppDelegate+ThirdParty.m */,
8361B3CC212155C200238FEB /* ViewController.h */,
8361B3CD212155C200238FEB /* ViewController.m */,
8361B3CF212155C200238FEB /* Main.storyboard */,
@@ -997,6 +1019,8 @@
8361B3FC21215C7400238FEB /* Common */ = {
isa = PBXGroup;
children = (
838CD5952179E11D000CBEA6 /* GIGaDateHelper.h */,
838CD5962179E11E000CBEA6 /* GIGaDateHelper.m */,
8340BFAC213E7374008F22E4 /* Views */,
8340BF9F213E6080008F22E4 /* GIGAMBHUDHelper */,
83928FFF2134F4230077D2E8 /* LXDanMuManager */,
@@ -1523,6 +1547,17 @@
path = userInfoView;
sourceTree = "<group>";
};
838CD59E2179E79C000CBEA6 /* JYAddressPicker */ = {
isa = PBXGroup;
children = (
838CD59F2179E79C000CBEA6 /* JYAddressPicker.h */,
838CD5A02179E79C000CBEA6 /* city.json */,
838CD5A12179E79C000CBEA6 /* JYAddressPicker.m */,
);
name = JYAddressPicker;
path = "../../../../../MaskTime素材新/JYAddressPicker";
sourceTree = "<group>";
};
83901143214E20B1004CA790 /* LYSDatePickerController */ = {
isa = PBXGroup;
children = (
@@ -1813,7 +1848,6 @@
83C78A10215872F80083DDD9 /* MasHistoryFirstViewCell.xib in Resources */,
8361B3D6212155C300238FEB /* LaunchScreen.storyboard in Resources */,
838762E3214B9F580039D241 /* GiGaUserSexViewCell.xib in Resources */,
838388DA2130046D00D14C53 /* emojizone.mp4 in Resources */,
83A22720212AC8C100B3E75C /* GiGaUserLoginVC.xib in Resources */,
838762D4214B9D120039D241 /* GIGaUserInfoAvatorCell.xib in Resources */,
8382DFBA2156389200BBA5A5 /* GIGaFeedImagsCollectionCell.xib in Resources */,
@@ -1823,9 +1857,9 @@
83BFAE78213CDE91004EF801 /* GiGaSettingsViewCell.xib in Resources */,
8382DFA22155F68800BBA5A5 /* MaskActionSheetViewCell.xib in Resources */,
83346AC1212BB50A0054D597 /* PassWordResetVC.xib in Resources */,
83D0B92C216C5A80006B77DC /* ogg_btn.mp3 in Resources */,
83BDC0592147B89900E74E0D /* GiGaAnswerViewCell.xib in Resources */,
8351473D215215C500B25A88 /* GiGAUserInfoCell.xib in Resources */,
83346AD1212BF5B70054D597 /* useragreement.html in Resources */,
8376B8332154A39200AB79F8 /* MaskTimeEndActionViewCell.xib in Resources */,
838762D9214B9EF80039D241 /* GIGaUserIDViewCell.xib in Resources */,
838762E8214B9FA60039D241 /* GIGaUserCityViewCell.xib in Resources */,
@@ -1834,13 +1868,13 @@
834BDA48215C7D10001E1DB7 /* InfoPlist.strings in Resources */,
8382DFEF21564A1F00BBA5A5 /* photopicker_back.png in Resources */,
83BFAE68213CCF10004EF801 /* GiGaMineUserViewCell.xib in Resources */,
8376B8202154913E00AB79F8 /* city.json in Resources */,
8351474221521C2A00B25A88 /* GIGaChangePassVC.xib in Resources */,
8382DFAD215626CE00BBA5A5 /* GiGaFeedContentViewCell.xib in Resources */,
8340BFA9213E65CA008F22E4 /* GIGACommonLocalizabe.strings in Resources */,
83835BA8212E4748001480F2 /* MAssaageCenterCell.xib in Resources */,
8361B3D3212155C300238FEB /* Assets.xcassets in Resources */,
8340BFA6213E6514008F22E4 /* Localizable.strings in Resources */,
838CD5A22179E79C000CBEA6 /* city.json in Resources */,
8361B3D1212155C200238FEB /* Main.storyboard in Resources */,
8376B8412154CEB200AB79F8 /* MaskShareTimeMidViewCell.xib in Resources */,
8340BFAB213E665D008F22E4 /* GIGAUserLocalizable.strings in Resources */,
@@ -1951,13 +1985,13 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
83319C87217437E0005EF726 /* AppDelegate.m in Sources */,
835060AD212D4D0C007E6220 /* GiGaFileNanager.m in Sources */,
8382DFF621564A1F00BBA5A5 /* SJPhotoPickerToolBar.m in Sources */,
83846441214A4BFF00F12B33 /* MaskTestResultVC.m in Sources */,
83346AC5212BBC8C0054D597 /* GiGaRegistViewController.m in Sources */,
83346AD7212C18F50054D597 /* GiGaAppGaurdVC.m in Sources */,
8351474B21523B7400B25A88 /* GIGaUserChangeMobleCell.m in Sources */,
8349585C212511040064DB6C /* AppDelegate+ThirdParty.m in Sources */,
83048481214F489000603CE7 /* GiGaUserJobViewCell.m in Sources */,
8376B83B2154CE8C00AB79F8 /* MaskTimeShareViewCell.m in Sources */,
83BFAE73213CDB58004EF801 /* GiSysSettingsVC.m in Sources */,
@@ -1968,6 +2002,7 @@
834415EF215B52EF00A6D906 /* MaskTestNODataViewCell.m in Sources */,
8382DFF321564A1F00BBA5A5 /* SJPreviewPhotoCell.m in Sources */,
8314D2112133ABE500B458BF /* WeiIXinApiManager.m in Sources */,
83379D0E21703CC100986278 /* GIGaSharePageViewController.m in Sources */,
83BDC0582147B89900E74E0D /* GiGaAnswerViewCell.m in Sources */,
83BC8A862148BE8A00820437 /* NYSliderPopover.m in Sources */,
83773FC52147A5CC0014EE4C /* MaskQuestionView.m in Sources */,
@@ -1976,6 +2011,7 @@
8361B4382121847600238FEB /* UINavigationBar+Custom.m in Sources */,
83BFAE6C213CD0E3004EF801 /* GiGaMineInfoViewCell.m in Sources */,
834DA5A8215F5FE0003FC4C6 /* ShareCustomIamgeModel.m in Sources */,
838CD5A32179E79C000CBEA6 /* JYAddressPicker.m in Sources */,
8376B8402154CEB200AB79F8 /* MaskShareTimeMidViewCell.m in Sources */,
8390116B214E20B2004CA790 /* LYSDateContentView.m in Sources */,
83BC8A872148BE8A00820437 /* NYPopover.m in Sources */,
@@ -1987,6 +2023,7 @@
83BC8A8A2148D28300820437 /* QustionAnswer.m in Sources */,
8342FD7D2150F94600D141F4 /* AppVerionDescriptionVC.m in Sources */,
8357ADC92123BFCA000816F2 /* GiGaUserManager.m in Sources */,
83379D0B217033A800986278 /* GiGaLoaclImageModel.m in Sources */,
8390116F214E20B2004CA790 /* LYSDatePickerViewController.m in Sources */,
8351473C215215C500B25A88 /* GiGAUserInfoCell.m in Sources */,
8384F0E821533528002C19F0 /* MaskResultPercentCell.m in Sources */,
@@ -1994,6 +2031,7 @@
83835BC3212E677C001480F2 /* GiGaQuestionVC.m in Sources */,
8382DFB121562B0A00BBA5A5 /* GIGaFeedQQViewCell.m in Sources */,
83A2271F212AC8C100B3E75C /* GiGaUserLoginVC.m in Sources */,
835A0EAF216AFDC300ABAB1C /* LXPageControl.m in Sources */,
83901177214E20B2004CA790 /* LYSDatePickerTypeTimeDelegate.m in Sources */,
8382DFB521562C6600BBA5A5 /* GIGaFeedPhontosViewCell.m in Sources */,
83346ACE212BD7830054D597 /* GiGaWebViewController.m in Sources */,
@@ -2029,10 +2067,12 @@
835060A9212D38EE007E6220 /* GiGaStartAdView.m in Sources */,
83928FFA2134D8F60077D2E8 /* GiGaFlyingCommitInputView.m in Sources */,
8390116D214E20B2004CA790 /* LYSDateBaseViewController.m in Sources */,
835A0EAC216AF03C00ABAB1C /* GiGaPageControl.m in Sources */,
838388D3212FB7D700D14C53 /* JXTAlertController.m in Sources */,
833DA7762122A62000A5C614 /* GiGaMaskTaskViewController.m in Sources */,
836EE5D7213645E300F0ABB2 /* GiGaBaseAPiRequest.m in Sources */,
8376B8232154927300AB79F8 /* GIGaMaskShareViewController.m in Sources */,
83319C852174376C005EF726 /* AppDelegate+ThirdParty.m in Sources */,
83773FBC214769230014EE4C /* ExercisesModel.m in Sources */,
8384F0EE2153355A002C19F0 /* MaskResultShareViewCell.m in Sources */,
8376B8452154CEC800AB79F8 /* MaskShareBoootomViewCell.m in Sources */,
@@ -2044,7 +2084,6 @@
83901179214E20B2004CA790 /* LYSDatePickerTypeBase.m in Sources */,
835060A2212D1225007E6220 /* GiGaMeViewController.m in Sources */,
83C78A192159D74D0083DDD9 /* UIImage+LogoQrCode.m in Sources */,
8361B3CB212155C200238FEB /* AppDelegate.m in Sources */,
8382DFB92156389200BBA5A5 /* GIGaFeedImagsCollectionCell.m in Sources */,
8351474621521CC500B25A88 /* GiGaChangePhoneNumberVC.m in Sources */,
838388C8212F9C4200D14C53 /* GiGaLocalNotificationManager.m in Sources */,
@@ -2062,6 +2101,7 @@
8357ADD32123C7C6000816F2 /* GiGaAPIResult.m in Sources */,
8340BF9E213E3846008F22E4 /* SHineLabel.m in Sources */,
8342FD862150FD5200D141F4 /* VersionModel.m in Sources */,
838CD5972179E11E000CBEA6 /* GIGaDateHelper.m in Sources */,
838762D3214B9D120039D241 /* GIGaUserInfoAvatorCell.m in Sources */,
8361B4352121836700238FEB /* GiGaBaseNavViewController.m in Sources */,
835060B3212D54C2007E6220 /* GiGaAdDetailViewController.m in Sources */,
@@ -2076,7 +2116,6 @@
8382DFEB21564A1F00BBA5A5 /* SJPreviewPhotoController.m in Sources */,
8376B81E2154897700AB79F8 /* GIGaUserFileHelper.m in Sources */,
8376B8362154C74300AB79F8 /* ShareViewController.m in Sources */,
833DE8E52150169F009D4329 /* JYAddressPicker.m in Sources */,
834127212152AEFB001DDB36 /* GIGaMaskTimeUseRecordVC.m in Sources */,
83901171214E20B2004CA790 /* LYSDatePickerLabel.m in Sources */,
83C78A14215873170083DDD9 /* MaskHistoryListViewCell.m in Sources */,
@@ -2086,12 +2125,12 @@
83E40B2F21218BA0008149C4 /* GiGaUserViewController.m in Sources */,
8382DFE721564A1F00BBA5A5 /* SJPhotoPicker.m in Sources */,
83901170214E20B2004CA790 /* LYSDateHeaderViewController.m in Sources */,
835060A5212D3536007E6220 /* AppDelegate+GiGaConfig.m in Sources */,
835147312151E4EF00B25A88 /* GIGaAboutUsVC.m in Sources */,
8376B8282154A0A200AB79F8 /* MaskTimeEndViewImgaeCell.m in Sources */,
83901174214E20B2004CA790 /* LYSDateIndicatorViewController.m in Sources */,
8390117B214E20B2004CA790 /* LYSDatePickerHeaderView.m in Sources */,
838762E7214B9FA60039D241 /* GIGaUserCityViewCell.m in Sources */,
83319C862174376C005EF726 /* AppDelegate+GiGaConfig.m in Sources */,
8342FD822150FA1500D141F4 /* AppVersionDescCell.m in Sources */,
834DA5AB215F6840003FC4C6 /* JobModel.m in Sources */,
83BFAE77213CDE91004EF801 /* GiGaSettingsViewCell.m in Sources */,
@@ -2107,6 +2146,7 @@
83A22712212A9EA900B3E75C /* UIView+Sizes.m in Sources */,
839290092134F4C40077D2E8 /* GiGaFlingCommitVC.m in Sources */,
834415EA215B4E6F00A6D906 /* HistoryNoDataViewCell.m in Sources */,
83276187216F29A800C6216C /* LXCustomActionSheet.m in Sources */,
83BFAE70213CDB29004EF801 /* GiMaskTimeHistoryVC.m in Sources */,
8382DFEA21564A1F00BBA5A5 /* SJPhotoAlbumsController.m in Sources */,
83A22718212ABDFF00B3E75C /* GiGaBlockButton.m in Sources */,
@@ -2306,10 +2346,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/GIGA/Common/libs/ZbarSDK/ZBarSDK",
);
LIBRARY_SEARCH_PATHS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = com.gigamask.ios;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
@@ -2340,10 +2377,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/GIGA/Common/libs/ZbarSDK/ZBarSDK",
);
LIBRARY_SEARCH_PATHS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = com.gigamask.ios;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
-13
View File
@@ -1,13 +0,0 @@
//
// AppDelegate+Config.h
// GIGA
//
// Created by lianxiang on 2018/8/13.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import "AppDelegate.h"
@interface AppDelegate ()
@end
+1
View File
@@ -90,6 +90,7 @@
-(void)creatAdView{
GiGaStartAdView *startadview = [[GiGaStartAdView alloc] initWithFrame:self.window.bounds];
[startadview show];
}
+42 -6
View File
@@ -27,8 +27,8 @@
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
//[NSThread sleepForTimeInterval:1];//延迟启动
_isMasking = NO;
self.isMasking = [GiGaUserDefault isMasking];
//_isMasking = NO;
[[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
[self registLocalNotification];
[self configThridPartyWithOptions:launchOptions];
@@ -51,8 +51,41 @@
[GiGaBaseAPiRequest userTokenTimeOutGologinFromVC:self.window.rootViewController];
}
}];
}else{
// 未登录同步默认面膜时间
GiGaBaseAPiRequest *api = [GiGaBaseAPiRequest initWithRequestPath:kUserDefaultMaskTime method:RequestPostMethod parms:nil];
[api requstDataWithResult:^(GiGaAPIResult *result) {
if (result.success) {
float minute = [result.dic[@"minute"] floatValue];
if (minute !=0) {
[GiGaUserDefault savaMaskeTime:minute*60];
}
}
}];
}
//用户关闭后台权限 提醒开启
if ([[UIApplication sharedApplication] backgroundRefreshStatus] != UIBackgroundRefreshStatusAvailable ) {
[self.window.rootViewController jxt_showAlertWithTitle:@"温馨提示" message:@"为保证您正常使用面膜时间,需要您开启后台刷新,请在 设置->面膜时间->应用程序后台刷新 开启" appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
alertMaker.addActionCancelTitle(@"下次");
alertMaker.addActionDefaultTitle(@"去开启");
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
if (buttonIndex == 1) {
NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
if ([[UIApplication sharedApplication] canOpenURL:url]) {
[[UIApplication sharedApplication] openURL:url];
}
}
}];
}
return YES;
}
@@ -105,13 +138,16 @@
- (void)applicationWillTerminate:(UIApplication *)application {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
//app 挂起 面膜时间未结束 发送本地通知提醒
[GiGaUserDefault saveisMaskingflag:_isMasking];
//app 挂起 面膜时间未结束 发送本地通知提醒
if (_isMasking) {
// [[GiGaLocalNotificationManager localNotifiationCenter] sendLocalNotification:@"闹钟提醒!" fireTimeInterval:2 alertAction:@"面膜时间已添加闹钟提醒!" withIdentifier:kLOCALNotifiID_APPTERMINAL];
//进程结束 长期保持后台前提下 用户主动挂起 取消本地推送。
// [[GiGaLocalNotificationManager localNotifiationCenter] cancelAllLocalNoitification];
}
[[GiGaLocalNotificationManager localNotifiationCenter] cancelAllLocalNoitification];
}
-(void)remoteControlReceivedWithEvent:(UIEvent *)event
@@ -2,7 +2,6 @@
"images" : [
{
"idiom" : "universal",
"filename" : "appgaurd_moon.png",
"scale" : "1x"
},
{
@@ -12,7 +11,6 @@
},
{
"idiom" : "universal",
"filename" : "appgaurd_moon@3x.png",
"scale" : "3x"
}
],
Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "page2_img.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "page2_img@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "page2_img@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "page2_women@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "page3_img.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "page3_img@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "page3_img@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "page3_woman@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "page_logo@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "pagecontrol_current@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 296 B

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "pagecontrol_def@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 264 B

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "bg_off@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "bg_on@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "img_product@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

@@ -11,6 +11,7 @@
},
{
"idiom" : "universal",
"filename" : "share_minute@3x.png",
"scale" : "3x"
}
],
Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

+25
View File
@@ -0,0 +1,25 @@
//
// GIGaDateHelper.h
// MasKTimeCountTime
//
// Created by lianxiang on 2018/10/19.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface GIGaDateHelper : NSObject
+(NSString *)getNowTimeTimestamp2;
+(NSDate *)getStartDate;
+(void)saveSatrtDate;
+(int)getTimebySubtracting:(NSDate*)Date1 andDate2:(NSDate*)Date2;
+(void)saveisMaskingflag:(BOOL)masking;
+(BOOL)isMasking;
+(void)removeStartDate;
@end
NS_ASSUME_NONNULL_END
+73
View File
@@ -0,0 +1,73 @@
//
// GIGaDateHelper.m
// MasKTimeCountTime
//
// Created by lianxiang on 2018/10/19.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import "GIGaDateHelper.h"
@implementation GIGaDateHelper
//获取当前时间 单位秒
+(NSString *)getNowTimeTimestamp2{
NSDate* dat = [NSDate dateWithTimeIntervalSinceNow:0];
NSLog(@"date :%@",dat);
NSTimeInterval a=[dat timeIntervalSince1970];
NSString*timeString = [NSString stringWithFormat:@"%0.f", a];
//转为字符型 ;
return timeString;
}
+(NSDate *)getStartDate{
NSDate *start = [[NSUserDefaults standardUserDefaults] objectForKey:@"start"];
return start;
}
+(void )saveSatrtDate{
NSDate* dat = [NSDate dateWithTimeIntervalSinceNow:0];
[[NSUserDefaults standardUserDefaults] setObject:dat forKey:@"start"];
[[NSUserDefaults standardUserDefaults] synchronize];
}
+(void)removeStartDate{
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"start"];
[[NSUserDefaults standardUserDefaults] synchronize];
}
+(int)getTimebySubtracting:(NSDate*)Date1 andDate2:(NSDate*)Date2
{
NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian];
unsigned int unitFlags = NSCalendarUnitSecond;
NSDateComponents *comps = [gregorian components: unitFlags fromDate:Date1 toDate:Date2 options:0];
int seconds = (int)[comps second];
return seconds;
}
+(void)saveisMaskingflag:(BOOL)masking{
[[NSUserDefaults standardUserDefaults] setBool:masking forKey:@"isMasking"];
[[NSUserDefaults standardUserDefaults] synchronize];
}
+(BOOL)isMasking{
BOOL ismasking = [[NSUserDefaults standardUserDefaults] boolForKey:@"isMasking"];
return ismasking;
}
@end
+3 -1
View File
@@ -7,7 +7,7 @@
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface GiGaHelper : NSObject
/**
* 获取当前时间 格式 yyyy-MM-dd hh:mm:ss
@@ -70,4 +70,6 @@
+(NSString*)dictionaryToJson:(NSDictionary *)dic;
NS_ASSUME_NONNULL_END
@end
+2 -1
View File
@@ -7,7 +7,7 @@
//
#import "GiGaHelper.h"
#import <Photos/Photos.h>
@implementation GiGaHelper
+(NSString *) getNowTimeString{
@@ -294,4 +294,5 @@
}
@end
@@ -27,12 +27,12 @@
-(void)sendLocalNotification:(NSString *)alertBoday fireTimeInterval:(NSTimeInterval )timeInterval alertAction:(NSString *)alertAction withIdentifier:(NSString *)identifier;
/**
删除当前程序注册的所有通知 ios 8 后 iOS10 前
删除当前程序注册的所有通知
*/
-(void)cancelAllLocalNoitification;
/**
删除指定的通知,一般用于取消重复的通知或者还没有被调用的通知,先获取通知,再遍历根据条件去删除(条件是 UserInfo 的值,是发送通知时所携带的参数) ios 8 后 iOS10 前
删除指定的通知,一般用于取消重复的通知或者还没有被调用的通知,先获取通知,再遍历根据条件去删除(条件是 UserInfo 的值,是发送通知时所携带的参数)
*/
-(void)cancelLocalNitificationByUserInfowithIdentifier:(NSString *)identifier;
@@ -41,7 +41,6 @@
*/
-(void)didResaveloaclNitification:(UILocalNotification *)localNitification;
//处理通知。。
@@ -74,7 +74,7 @@
if (@available(iOS 10.0, *)) {
[[UNUserNotificationCenter currentNotificationCenter] removeAllDeliveredNotifications];
[[UNUserNotificationCenter currentNotificationCenter] removeAllPendingNotificationRequests];
} else {
// Fallback on earlier versions
@@ -87,7 +87,7 @@
-(void)cancelLocalNitificationByUserInfowithIdentifier:(NSString *)identifier{
if (@available(iOS 10.0, *)) {
[[UNUserNotificationCenter currentNotificationCenter] removeDeliveredNotificationsWithIdentifiers:@[identifier]];
[[UNUserNotificationCenter currentNotificationCenter] removePendingNotificationRequestsWithIdentifiers:@[identifier]];
} else {
// Fallback on earlier versions
NSArray *notifiArray = [[UIApplication sharedApplication] scheduledLocalNotifications];
@@ -125,7 +125,7 @@ API_AVAILABLE(ios(10.0)){
// 判断为本地通知
NSLog(@"iOS10 前台 收到本地通知:{\\\\nbody:%@\\\\ntitle:%@,\\\\nsubtitle:%@,\\\\nbadge%@\\\\nsound%@\\\\nuserInfo%@\\\\n}",body,title,subtitle,badge,sound,userInfo);
[self showAlert:title message:body];
//[self showAlert:title message:body];
[center removeAllPendingNotificationRequests];
}
completionHandler(UNNotificationPresentationOptionBadge|UNNotificationPresentationOptionSound|UNNotificationPresentationOptionAlert);
+9
View File
@@ -69,5 +69,14 @@
+(void)savaMaskeTime:(NSTimeInterval)time;
+(NSTimeInterval)getUserMaskeTime;
/**
记录是否测试过
*/
+(void)saveUserTestFlag:(BOOL)tested;
+(BOOL)isUserTest;
+(void)saveisMaskingflag:(BOOL)masking;
+(BOOL)isMasking;
@end
+30 -3
View File
@@ -17,7 +17,8 @@ NSString *const kWeiXinUserInfo = @"WeiXinUserinfo";
NSString *const kGiGaToken = @"GiGatoken";
NSString *const kMaskeTime= @"userMaskeTime";
NSString *const kWeiXinCodeInfo = @"WeiXinCodeinfo";
#define MASKTIME_DEFAULT 20;
NSString *const kShowUserTested = @"kShowUserTested";
#define MASKTIME_DEFAULT 17.5;
@implementation GiGaUserDefault
@@ -144,11 +145,37 @@ NSString *const kWeiXinCodeInfo = @"WeiXinCodeinfo";
NSTimeInterval time = [UD_STADARDUD doubleForKey:kMaskeTime];
if (time == 0) {
//默认15 分钟
time = 15 * 60;
//默认17.5 分钟 已改调用接口同步默认
time = 17.5 * 60;
//time = MASKTIME_DEFAULT;
}
//time = 10;
return time;
}
+(void)saveUserTestFlag:(BOOL)tested{
[UD_STADARDUD setBool:tested forKey:kShowUserTested];
[UD_STADARDUD synchronize];
}
+(BOOL)isUserTest{
BOOL showedGaurd = [UD_STADARDUD boolForKey:kShowUserTested];
[UD_STADARDUD synchronize];
return showedGaurd;
}
+(void)saveisMaskingflag:(BOOL)masking{
[[NSUserDefaults standardUserDefaults] setBool:masking forKey:@"isMasking"];
[[NSUserDefaults standardUserDefaults] synchronize];
}
+(BOOL)isMasking{
BOOL ismasking = [[NSUserDefaults standardUserDefaults] boolForKey:@"isMasking"];
return ismasking;
}
@end
+5 -1
View File
@@ -69,7 +69,7 @@ const static NSInteger GIGADB_USER_VER = 0;//当前数据库版本号
}else{
if (errorCodeMsg) {
errorCodeMsg(requst.resultDict);
errorCodeMsg(result.dic);
}
}
@@ -96,6 +96,10 @@ const static NSInteger GIGADB_USER_VER = 0;//当前数据库版本号
[_store putObject:_userArr withId:userTableId intoTable:GIGA_USER_TABLE];
[GiGaUserDefault saveUserId:userTableId];
if (user.minute != 0) {
[GiGaUserDefault savaMaskeTime:user.minute * 60];
}
}
//已登录
+1 -1
View File
@@ -15,7 +15,7 @@
* finishTimeStamp 结束的时间戳
*/
-(void)countDownWithStratTimeStamp:(long)starTimeStamp finishTimeStamp:(long)finishTimeStamp completeBlock:(void (^)(NSInteger day,NSInteger hour,NSInteger minute,NSInteger second))completeBlock;
-(void)countDownWithtimerInterval:(NSTimeInterval)timerInterval completeBlock:(void (^)(NSInteger day, NSInteger hour, NSInteger minute, NSInteger second))completeBlock;
/**
* 每秒走一次,回调block
+36
View File
@@ -54,6 +54,42 @@
}
}
-(void)countDownWithtimerInterval:(NSTimeInterval)timerInterval completeBlock:(void (^)(NSInteger, NSInteger, NSInteger, NSInteger))completeBlock{
if (_timer == nil) {
__block int timeout = timerInterval;
if (timeout !=0) {
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
_timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, queue);
dispatch_source_set_timer(_timer, dispatch_walltime(NULL, 0), 1.0*NSEC_PER_SEC, 0);//每秒执行
dispatch_source_set_event_handler(_timer, ^{
if (timeout<=0) {
//记时结束, 关闭
dispatch_source_cancel(self->_timer);
self->_timer = nil;
dispatch_async(dispatch_get_main_queue(), ^{
completeBlock(0,0,0,0);
});
}else{
int days = (int)(timeout/(3600*24));
int hours = (int)((timeout-days*24*3600)/3600);
int minute = (int)(timeout-days*24*3600-hours*3600)/60;
int second = timeout-days*24*3600-hours*3600-minute*60;
dispatch_async(dispatch_get_main_queue(), ^{
completeBlock(days,hours,minute,second);
});
timeout--;
}
});
dispatch_resume(_timer);
}
}
}
-(void)countDownWithPER_SECBlock:(void (^)(void))PER_SECBlock{
if (_timer==nil) {
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
Binary file not shown.
BIN
View File
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -0,0 +1,23 @@
//
// LXCustomActionSheet.h
// CustomUISwitch
//
// Created by lianxiang on 2018/10/11.
// Copyright © 2018年 lian. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface LXCustomActionSheet : UIView
- (instancetype)initWithTitle:(NSString*)title
optionsArr:(NSArray*)optionsArr
cancelTitle:(NSString*)cancelTitle
selectedBlock:(void(^)(NSInteger))selectedBlock
cancelBlock:(void(^)(void))cancelBlock;
-(void)show;
@end
@@ -0,0 +1,192 @@
//
// LXCustomActionSheet.m
// CustomUISwitch
//
// Created by lianxiang on 2018/10/11.
// Copyright © 2018年 lian. All rights reserved.
//
#import "LXCustomActionSheet.h"
#define Screen_Width [UIScreen mainScreen].bounds.size.width
#define Screen_height [UIScreen mainScreen].bounds.size.height
#define SPACE 10
@interface LXCustomActionSheet ()<UITableViewDelegate,UITableViewDataSource>
@property (nonatomic, strong) UIView *maskView;
@property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, strong) NSArray *optionsArr;
@property (nonatomic, copy) NSString *title;
@property (nonatomic, copy) NSString *cancelTitle;
@property (nonatomic, strong) UIView *headView;
@property (nonatomic, copy) void(^selectedBlock)(NSInteger);
@property (nonatomic, copy) void(^cancelBlock)(void);
@end
@implementation LXCustomActionSheet
- (instancetype)initWithTitle:(NSString*)title
optionsArr:(NSArray*)optionsArr
cancelTitle:(NSString*)cancelTitle
selectedBlock:(void(^)(NSInteger))selectedBlock
cancelBlock:(void(^)(void))cancelBlock{
if (self = [super init]) {
_title = title;
_optionsArr = optionsArr;
_cancelTitle = cancelTitle;
_selectedBlock = selectedBlock;
_cancelBlock = cancelBlock;
[self craetUI];
}
return self;
}
- (void)craetUI {
self.frame = [UIScreen mainScreen].bounds;
[self addSubview:self.maskView];
[self addSubview:self.tableView];
}
- (UIView*)maskView {
if (!_maskView) {
_maskView = [[UIView alloc]initWithFrame:[UIScreen mainScreen].bounds];
_maskView.backgroundColor = [UIColor blackColor];
_maskView.alpha = .5;
_maskView.userInteractionEnabled = YES;
}
return _maskView;
}
- (UITableView *)tableView {
if (!_tableView) {
_tableView = [[UITableView alloc]initWithFrame:CGRectZero style:UITableViewStylePlain];
_tableView.delegate = self;
_tableView.dataSource = self;
_tableView.rowHeight = 44.0;
_tableView.bounces = NO;
_tableView.showsVerticalScrollIndicator = NO;
_tableView.backgroundColor = [UIColor clearColor];
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
UIView *tabHeader = [[UIView alloc] initWithFrame:CGRectMake(0, 0,Screen_Width, 50)];
tabHeader.backgroundColor = [UIColor whiteColor];
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:
CGRectMake(0, 0, Screen_Width, 50) byRoundingCorners:
UIRectCornerTopLeft|UIRectCornerTopRight cornerRadii:
CGSizeMake(10, 10)];
CAShapeLayer *maskLayer = [[CAShapeLayer alloc]init];
maskLayer.frame = tabHeader.bounds;
maskLayer.path = maskPath.CGPath;
tabHeader.layer.mask = maskLayer;
UILabel *titleLabe = [[UILabel alloc] init];
titleLabe.frame = tabHeader.bounds;
titleLabe.textAlignment = NSTextAlignmentCenter;
titleLabe.text = self.title;
titleLabe.font = GIGA_TEXTFONTMEDIUM(15);
titleLabe.textColor = GIGA_MAIN_BGCOLOR;
[tabHeader addSubview:titleLabe];
UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(0, tabHeader.frame.size.height -0.5, Screen_Width, 0.5)];
lineView.backgroundColor = [UIColor colorWithRed:222/255.0f green:222/255.0f blue:222/255.0f alpha:1];
[tabHeader addSubview:lineView];
self.headView = tabHeader;
_tableView.tableHeaderView = self.headView;
// _tableView.separatorInset = UIEdgeInsetsMake(0, -50, 0, 0);
[_tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"Navi_Cell"];
}
return _tableView;
}
#pragma mark TableView
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 2;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return (section == 0)?_optionsArr.count:1;
}
- (UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Navi_Cell"];
cell.textLabel.font = GIGA_TEXTFONTMEDIUM(18);
cell.textLabel.textColor = GIGA_MAIN_BGCOLOR;
if (indexPath.section == 0) {
cell.textLabel.text = _optionsArr[indexPath.row];
UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(0,cell.frame.size.height - 0.5, Screen_Width, 0.5)];
lineView.backgroundColor = [UIColor colorWithRed:222/255.0f green:222/255.0f blue:222/255.0f alpha:1];
[cell.contentView addSubview:lineView];
} else {
cell.textLabel.text = _cancelTitle;
}
cell.textLabel.textAlignment = NSTextAlignmentCenter;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == 0) {
if (self.selectedBlock) {
self.selectedBlock(indexPath.row);
}
}else{
if (self.cancelBlock) {
self.cancelBlock();
}
}
[self dismiss];
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
if (section==0) {
return 3;
}
return 0;
}
- (UIView*)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
UIView *footerView = [[UIView alloc] init];
footerView.backgroundColor = [UIColor colorWithRed:222/255.0f green:222/255.0f blue:222/255.0f alpha:1];
return footerView;
}
-(void)show{
[[UIApplication sharedApplication].keyWindow addSubview:self];
}
- (void)layoutSubviews {
[super layoutSubviews];
[self showTab];
}
- (void)showTab{
_tableView.frame = CGRectMake(0,Screen_height, Screen_Width, _tableView.rowHeight * (_optionsArr.count + 1) + 50 + 3);
[UIView animateWithDuration:.5 animations:^{
CGRect rect = self->_tableView.frame;
rect.origin.y -= self->_tableView.bounds.size.height;
self->_tableView.frame = rect;
}];
}
- (void)dismiss {
[UIView animateWithDuration:.5 animations:^{
CGRect rect = self->_tableView.frame;
rect.origin.y += self->_tableView.bounds.size.height;
self->_tableView.frame = rect;
} completion:^(BOOL finished) {
[self removeFromSuperview];
}];
}
- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
if (self.cancelBlock) {
self.cancelBlock();
}
[self dismiss];
}
@end
+6 -1
View File
@@ -41,7 +41,9 @@
#define kApiVersifyPhoneCode @"user/v1/validateSmsCode"
//注册发送短信
#define kApiUserRegistSendCode @"msg/sms/v1/registersendcode"
//手机登录 获取验证码
#define kApiIUserLoginSendCode @"msg/sms/v1/sendcode"
#define kApiUserloginWithSMSCode @"sys/v1/mobilecodelogin"
//获取意见反馈类型 (设置意见反馈)
#define kApiGetFeedList @"sys/sysdict/v1/maskproposaltype"
@@ -71,5 +73,8 @@
//正式
#define kIMPRITNT @"http://app.mianmoshijian.com/imprint.html?device=ios"
//获取默认面膜时间
#define kUserDefaultMaskTime @"activity/maskuselog/v1/minute"
#endif /* ApiRequestConfig_h */
+3 -4
View File
@@ -68,10 +68,9 @@ green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \
blue:((float)(rgbValue & 0xFF))/255.0 alpha:alphaValue]
#define GIGAUIColorFromRGBA(rgbValue) [UIColor \
colorWithRed:((float)((rgbValue & 0xFF000000) >> 24))/255.0 \
green:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \
blue:((float)((rgbValue & 0xFF00) >> 8))/255.0 \
alpha:((float)(rgbValue & 0xFF))/255.0]
colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \
green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \
blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.f]
#define GIGA_MAIN_BGCOLOR [UIColor colorWithRed:131/255.0f green:10/255.0f blue:10/255.0f alpha:1]
#define SCREEN [UIScreen mainScreen]
+3 -2
View File
@@ -18,13 +18,15 @@
switch (type) {
case 0://测试环境
{
[[NSUserDefaults standardUserDefaults] setValue:@"http://apiyts.s1.natapp.cc/v1/" forKey:@"MainUrl"];
[[NSUserDefaults standardUserDefaults] setValue:@"http://wsyts.s1.natapp.cc" forKey:@"gigasocketUrl"];
// [[NSUserDefaults standardUserDefaults] setValue:@"https://api.mianmoshijian.com/v1/" forKey:@"MainUrl"];
// [[NSUserDefaults standardUserDefaults] setValue:@"https://ws.mianmoshijian.com" forKey:@"gigasocketUrl"];
}
break;
case 1: //生产环境
{
//https://api.mianmoshijian.com/v1/
@@ -33,7 +35,6 @@
}
break;
default:
break;
}
+1 -1
View File
@@ -26,11 +26,11 @@
#import "GIGA.h"
//#import "AFNetworking.h"
//#import <JSONModel/JSONModel.h>
#import "UIView+Toast.h"
#import "JXTAlertManagerHeader.h"
#import "Masonry.h"
#import "GiGaHelper.h"
#import "MobClickList.h"
#import "TTTAttributedLabel.h"
#import "GiGaUserManager.h"
+2 -11
View File
@@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.8.0</string>
<string>0.9.5</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
@@ -32,17 +32,9 @@
<string>wx1fa33defa5cbc8dd</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>Prefs</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.4.0</string>
<string>1.6.5</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>weixin</string>
@@ -62,7 +54,6 @@
<string>是否允许此App使用您的相册?</string>
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
<string>remote-notification</string>
</array>
<key>UILaunchStoryboardName</key>
@@ -20,6 +20,7 @@
[self addNavTitile:@"广告详情"];
// Do any additional setup after loading the view.
}
- (void)didReceiveMemoryWarning {
@@ -27,14 +28,5 @@
// 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.
}
*/
@end
@@ -9,5 +9,6 @@
#import <UIKit/UIKit.h>
#import "GiGaBaseViewController.h"
@interface GiGaRegistViewController : GiGaBaseViewController
@property (weak, nonatomic) IBOutlet UIScrollView *backScrollView;
@end
@@ -47,6 +47,13 @@
[self resetBackimg];
if (@available(iOS 11.0, *)) {
self.backScrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
} else {
self.automaticallyAdjustsScrollViewInsets = NO;
// Fallback on earlier versions
}
}
-(void)resetBackimg{
@@ -90,12 +97,12 @@
GIGA_ShowToast(@"请输入正确手机号");
return;
}
btn.userInteractionEnabled = NO;
[self startTimer:btn];
[self sendVerifiCode:btn];
}
-(void)startTimer:(UIButton *)btn{
btn.userInteractionEnabled = NO;
if (_time>0) {
_timer = [NSTimer scheduledTimerWithTimeInterval:1 count:60 callback:^{
NSString *timeStr=[NSString stringWithFormat:@"%lds",(long)self->_time];
@@ -128,7 +135,13 @@
[api requstDataWithResult:^(GiGaAPIResult *result) {
[MBProgressHUD hideHUDForView:self.view animated:YES];
GILog(@"短信获取%@",result.message);
btn.userInteractionEnabled = YES;
if (result.success) {
[self startTimer:btn];
}else{
GIGA_ShowToast(result.message);
}
}];
}
@@ -12,6 +12,7 @@
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="GiGaRegistViewController">
<connections>
<outlet property="backScrollView" destination="piO-PU-j8g" id="3ii-Sx-qXY"/>
<outlet property="checkBtn" destination="b06-w9-r2g" id="Cv8-zo-QoL"/>
<outlet property="codeTextField" destination="dR7-iu-Eup" id="wNt-AE-gpM"/>
<outlet property="passTexFied" destination="UUC-74-fsa" id="4hR-y9-jDa"/>
@@ -28,17 +29,17 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="piO-PU-j8g">
<rect key="frame" x="0.0" y="20" width="375" height="647"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="img_circle_avatar" translatesAutoresizingMaskIntoConstraints="NO" id="SEO-0F-Irb">
<rect key="frame" x="130.5" y="87" width="114" height="114"/>
<rect key="frame" x="130.5" y="43" width="114" height="114"/>
<constraints>
<constraint firstAttribute="width" constant="114" id="GOs-M2-rAk"/>
<constraint firstAttribute="height" constant="114" id="af0-Mm-2fL"/>
</constraints>
</imageView>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入手机号" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="uJG-KF-a91">
<rect key="frame" x="66" y="230" width="243" height="48"/>
<rect key="frame" x="66" y="186" width="243" height="48"/>
<constraints>
<constraint firstAttribute="height" constant="48" id="pzi-4C-7s8"/>
</constraints>
@@ -47,14 +48,14 @@
<textInputTraits key="textInputTraits" keyboardType="numberPad"/>
</textField>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ubQ-Za-dV7">
<rect key="frame" x="65" y="280" width="244" height="1"/>
<rect key="frame" x="65" y="236" width="244" height="1"/>
<color key="backgroundColor" red="0.94901960784313721" green="0.94901960784313721" blue="0.94901960784313721" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="Gbv-lr-zmA"/>
</constraints>
</view>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="短信验证码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="dR7-iu-Eup">
<rect key="frame" x="66" y="286" width="130" height="48"/>
<rect key="frame" x="66" y="242" width="130" height="48"/>
<constraints>
<constraint firstAttribute="height" constant="48" id="Iqo-gI-2Z3"/>
</constraints>
@@ -63,7 +64,7 @@
<textInputTraits key="textInputTraits" keyboardType="numberPad"/>
</textField>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qAH-Fa-AmF">
<rect key="frame" x="221" y="286" width="88" height="48"/>
<rect key="frame" x="221" y="242" width="88" height="48"/>
<constraints>
<constraint firstAttribute="width" constant="88" id="kZw-pm-n5p"/>
<constraint firstAttribute="height" constant="48" id="oB6-lP-x7P"/>
@@ -76,21 +77,21 @@
</state>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Trq-bz-kQT">
<rect key="frame" x="65" y="336" width="244" height="1"/>
<rect key="frame" x="65" y="292" width="244" height="1"/>
<color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="BYZ-mC-rOK"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Pb5-1e-TXp">
<rect key="frame" x="65.5" y="395" width="244" height="1"/>
<rect key="frame" x="65.5" y="351" width="244" height="1"/>
<color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="SYH-LK-7FR"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hZA-nj-Wmu">
<rect key="frame" x="84" y="437" width="207" height="41"/>
<rect key="frame" x="84" y="393" width="207" height="41"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="41" id="IZZ-Wn-zMh"/>
@@ -99,13 +100,13 @@
<state key="normal" title="注 册"/>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="已阅读并同意《用户服务协议》" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Vxb-TL-wDd" customClass="GiGaAttributedLabel">
<rect key="frame" x="117.5" y="550" width="140" height="15"/>
<rect key="frame" x="117.5" y="506" width="140" height="15"/>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="10"/>
<color key="textColor" red="0.56862745098039214" green="0.56862745098039214" blue="0.56862745098039214" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="highlightedColor" red="0.56862745100000001" green="0.56862745100000001" blue="0.56862745100000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="设置登录密码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="UUC-74-fsa">
<rect key="frame" x="65.5" y="345" width="244" height="48"/>
<rect key="frame" x="65.5" y="301" width="244" height="48"/>
<constraints>
<constraint firstAttribute="height" constant="48" id="o8f-Xh-HGs"/>
</constraints>
@@ -114,7 +115,7 @@
<textInputTraits key="textInputTraits" keyboardType="numbersAndPunctuation"/>
</textField>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="b06-w9-r2g">
<rect key="frame" x="75" y="539" width="39" height="37"/>
<rect key="frame" x="75" y="495" width="39" height="37"/>
<constraints>
<constraint firstAttribute="width" constant="39" id="FeL-ci-mXv"/>
<constraint firstAttribute="height" constant="37" id="sLA-cD-5zI"/>
@@ -128,7 +129,7 @@
<constraint firstItem="hZA-nj-Wmu" firstAttribute="centerX" secondItem="piO-PU-j8g" secondAttribute="centerX" id="7gX-TX-GAa"/>
<constraint firstItem="Vxb-TL-wDd" firstAttribute="centerX" secondItem="piO-PU-j8g" secondAttribute="centerX" id="Bz2-Js-CTt"/>
<constraint firstItem="ubQ-Za-dV7" firstAttribute="leading" secondItem="piO-PU-j8g" secondAttribute="leading" constant="65" id="CGf-BO-qJR"/>
<constraint firstAttribute="bottom" secondItem="Trq-bz-kQT" secondAttribute="bottom" constant="310" id="CnD-h1-kaA"/>
<constraint firstAttribute="bottom" secondItem="Trq-bz-kQT" secondAttribute="bottom" constant="354" id="CnD-h1-kaA"/>
<constraint firstItem="SEO-0F-Irb" firstAttribute="centerX" secondItem="piO-PU-j8g" secondAttribute="centerX" id="E3K-GK-vYR"/>
<constraint firstItem="uJG-KF-a91" firstAttribute="top" secondItem="SEO-0F-Irb" secondAttribute="bottom" constant="29" id="ECP-qY-1cd"/>
<constraint firstItem="UUC-74-fsa" firstAttribute="top" secondItem="Trq-bz-kQT" secondAttribute="bottom" constant="8" id="Gtf-ex-Tqo"/>
@@ -145,7 +146,7 @@
<constraint firstItem="hZA-nj-Wmu" firstAttribute="leading" relation="lessThanOrEqual" secondItem="piO-PU-j8g" secondAttribute="leading" constant="84" id="fcO-XF-ODc"/>
<constraint firstItem="uJG-KF-a91" firstAttribute="centerX" secondItem="piO-PU-j8g" secondAttribute="centerX" id="flh-N1-FvK"/>
<constraint firstItem="qAH-Fa-AmF" firstAttribute="trailing" secondItem="uJG-KF-a91" secondAttribute="trailing" id="fsZ-rC-rlA"/>
<constraint firstAttribute="trailing" secondItem="ubQ-Za-dV7" secondAttribute="trailing" constant="65" id="j6B-5X-ymb"/>
<constraint firstAttribute="trailing" secondItem="ubQ-Za-dV7" secondAttribute="trailing" constant="66" id="j6B-5X-ymb"/>
<constraint firstItem="dR7-iu-Eup" firstAttribute="top" secondItem="ubQ-Za-dV7" secondAttribute="bottom" constant="5" id="jKd-do-Qv6"/>
<constraint firstItem="Pb5-1e-TXp" firstAttribute="width" secondItem="Trq-bz-kQT" secondAttribute="width" id="kqU-bv-fGy"/>
<constraint firstItem="Pb5-1e-TXp" firstAttribute="centerX" secondItem="piO-PU-j8g" secondAttribute="centerX" id="mX6-oT-Oeq"/>
@@ -154,19 +155,19 @@
<constraint firstItem="hZA-nj-Wmu" firstAttribute="top" secondItem="Pb5-1e-TXp" secondAttribute="bottom" constant="41" id="xYx-Fr-OyO"/>
<constraint firstItem="b06-w9-r2g" firstAttribute="centerY" secondItem="Vxb-TL-wDd" secondAttribute="centerY" id="y5u-W9-HjP"/>
<constraint firstItem="UUC-74-fsa" firstAttribute="centerX" secondItem="piO-PU-j8g" secondAttribute="centerX" id="yQJ-WR-KVx"/>
<constraint firstItem="SEO-0F-Irb" firstAttribute="top" secondItem="piO-PU-j8g" secondAttribute="top" constant="87" id="ylx-4z-k36"/>
<constraint firstItem="SEO-0F-Irb" firstAttribute="top" secondItem="piO-PU-j8g" secondAttribute="top" constant="43" id="ylx-4z-k36"/>
</constraints>
</scrollView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="piO-PU-j8g" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" constant="20" id="FeS-pw-yBz"/>
<constraint firstItem="piO-PU-j8g" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="FeS-pw-yBz"/>
<constraint firstAttribute="bottom" secondItem="piO-PU-j8g" secondAttribute="bottom" id="LJj-gu-XvO"/>
<constraint firstItem="piO-PU-j8g" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="TBf-ZS-9tS"/>
<constraint firstAttribute="trailing" secondItem="piO-PU-j8g" secondAttribute="trailing" id="wPj-4k-nEv"/>
</constraints>
<viewLayoutGuide key="safeArea" id="7gZ-WS-Wjh"/>
<point key="canvasLocation" x="33.5" y="53.5"/>
<point key="canvasLocation" x="32.799999999999997" y="52.623688155922046"/>
</view>
</objects>
<resources>
@@ -10,5 +10,6 @@
#import "GiGaBaseViewController.h"
@interface GiGaUserLoginVC : GiGaBaseViewController
@property (weak, nonatomic) IBOutlet UIScrollView *backScrollView;
@end
+111 -65
View File
@@ -20,10 +20,12 @@
#import "GIGAMBHUDHelper.h"
#import "GiGaHelper.h"
#import "GiGaUserManager.h"
#import "NSTimer+Convenience.h"
@interface GiGaUserLoginVC ()
@property (weak, nonatomic) IBOutlet UIImageView *userImagView;
@property (weak, nonatomic) IBOutlet UITextField *acountTextField;
//0.9+ 改成code
@property (weak, nonatomic) IBOutlet UITextField *passwordTextField;
@property (weak, nonatomic) IBOutlet UIButton *loginBtn;
@@ -31,6 +33,8 @@
@property (weak, nonatomic) IBOutlet UIButton *registBtn;
@property (weak, nonatomic) IBOutlet UIButton *secretBtn;
@property(nonatomic,strong) NSTimer*timer;
@property(nonatomic) NSInteger time;
@end
@@ -38,7 +42,13 @@
- (void)viewDidLoad {
[super viewDidLoad];
self.automaticallyAdjustsScrollViewInsets = NO;
_time = 60;
if (@available(iOS 11.0, *)) {
self.backScrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
} else {
self.automaticallyAdjustsScrollViewInsets = NO;
// Fallback on earlier versions
}
// Do any additional setup after loading the view from its nib.
[self setUpX];
[self textFieldUI];
@@ -90,8 +100,9 @@
// NSAttributedString *passholderText = [[NSAttributedString alloc] initWithString:@"密码" attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:14],NSForegroundColorAttributeName:[UIColor redColor]}];
// self.passwordTextField.attributedPlaceholder = passholderText;
UIView *passView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
UIImageView *passViewIcon = [[UIImageView alloc] initWithFrame:CGRectMake(15,8, 12, 22)];
passViewIcon.image = [UIImage imageNamed:@"icon_key"];
UIImageView *passViewIcon = [[UIImageView alloc] initWithFrame:CGRectMake(12,13.5, 18, 13)];
passViewIcon.image = [UIImage imageNamed:@"ic_note"];
[passView addSubview:passViewIcon];
self.passwordTextField.leftView = passView;
self.passwordTextField.leftViewMode = UITextFieldViewModeAlways;
@@ -152,7 +163,7 @@
}
#pragma mark 手机号登录
#pragma mark 手机号登录 验证码登录
-(void)loginBtnAction:(UIButton *)btn{
if (self.acountTextField.text.length == 0) {
@@ -168,56 +179,54 @@
GIGA_ShowToast(@"密码不能为空");
return;
}
// BOOL isPass = [GiGaHelper checkPassWord:self.passwordTextField.text];
//
// if (isPass == NO) {
// GIGA_ShowToast(@"请输入6-20位数字和字母组成的密码");
// return;
// }
int leng = [GiGaHelper convertToInt: self.passwordTextField.text];
if (!(leng >= 6 && leng <= 20)) {
GIGA_ShowToast(@"请输入6-20位数字和字母组成的密码");
if (self.passwordTextField.text.length == 0) {
GIGA_ShowToast(@"请输入验证码");
return;
}
[self loginWithAction:btn];
}
-(void)loginWithAction:(UIButton *)btn{
// NSDictionary *weixinInfoDic = [GiGaUserDefault getWeiXinAccessToenDic];
// NSDictionary *weixinInfoDic = [GiGaUserDefault getWeiXinAccessToenDic];
NSString *wechatCode = [GiGaUserDefault getWeiXinCode];
NSDictionary *params = nil;
if (wechatCode) {
params = @{
@"username":self.acountTextField.text,
@"password":self.passwordTextField.text,
@"wechatCode":wechatCode,
};
}else{
params = @{
@"username":self.acountTextField.text,
@"password":self.passwordTextField.text
};
if (wechatCode==nil) {
wechatCode = @"";
}
NSDictionary *params = nil;
params = @{
@"mobile":self.acountTextField.text,
@"code":self.passwordTextField.text,
@"wechatCode":wechatCode,
};
//[GIGAMBHUDHelper messageAddto:self.view title:@"登录中..."];
[self.view makeToastActivity:CSToastPositionCenter];
NSString *baseapi = [GiGaServerConfig getMainUrl];
NSString *url = [NSString stringWithFormat:@"%@%@",baseapi,kApiUserLogin];
[GiGaNetManager userbodyRequest:url params:params completionHandler:^(NSURLResponse *response, NSDictionary *resDic, NSError * _Nullable error) {
GILog(@"%@",resDic);
//NSString *baseapi = [GiGaServerConfig getMainUrl];
//NSString *url = [NSString stringWithFormat:@"%@%@",baseapi,kApiUserloginWithSMSCode];
// [GiGaNetManager userbodyRequest:url params:params completionHandler:^(NSURLResponse *response, NSDictionary *resDic, NSError * _Nullable error) {
// GILog(@"%@",resDic);
// [self.view hideToastActivity];
// GiGaAPIResult *result = [[GiGaAPIResult alloc] initWithDictionary:resDic];
// GILog(@"**登陆***\n code:%ld\n message:%@\n *******\n",result.code,result.message);
// if (result.success) {
// [self userloginSussecess:resDic];
// }else{
// GIGA_ShowToast(result.message);
// }
// }];
//[GIGAMBHUDHelper messageAddto:self.view title:@"登录中..."];
[self.view makeToastActivity:CSToastPositionCenter];
GiGaBaseAPiRequest *api = [GiGaBaseAPiRequest initWithRequestPath:kApiUserloginWithSMSCode method:RequestPostMethod parms:params];
[api requstDataWithResult:^(GiGaAPIResult *result) {
[self.view hideToastActivity];
GiGaAPIResult *result = [[GiGaAPIResult alloc] initWithDictionary:resDic];
GILog(@"**登陆***\n code:%ld\n message:%@\n *******\n",result.code,result.message);
if (result.success) {
[self userloginSussecess:resDic];
[self userloginSussecess:result.dic];
}else{
GIGA_ShowToast(result.message);
@@ -294,7 +303,7 @@
}];
}
//上传微信用户信息
// 微信登陆
-(void)gigaUploadweixinInfo:(NSDictionary *)weiXinUserinfo{
[self.view makeToastActivity:CSToastPositionCenter];
@@ -307,45 +316,43 @@
if ([responseDict[@"code"] integerValue] == 0) {
[self userloginSussecess:responseDict];
}else if([responseDict[@"code"] integerValue] == 500){
//登录流程待定
[self.view makeToast:responseDict[@"msg"] duration:2.0 position:CSToastPositionCenter];
[self jxt_showAlertWithTitle:@"温馨提示" message:@"请先绑定手机账号" appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
alertMaker.addActionCancelTitle(@"知道了");
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
}];
}else{
[self.view makeToast:responseDict[@"msg"] duration:2.0 position:CSToastPositionCenter];
}
}else{
[self.view makeToast:@"用户信息提交异常"];
GILog(@"上传微信用户信息error:\n%@",error.localizedDescription);
}
}];
}
//请求用户数据
-(void)userloginSussecess:(NSDictionary *)resDic{
//token 登陆标志
[GiGaUserDefault saveToken:resDic[@"token"]];
//埋点
[MobClick endEvent:MobClick_UserLogin];
GIGA_WIndowTost(@"登录成功!");
//请求用户数据
weakify(self);
[[GiGaUserManager shareUser] synsisUserInfo:^(GiGaUser *user) {
GILog(@"user.userId:%@",user.userId);
//埋点
[MobClick endEvent:MobClick_UserLogin];
GIGA_WIndowTost(@"登录成功!");
NC_POST_NAME_OBJECT(kUserLoginSuccessNoti, nil);
[weakSelf dismissViewControllerAnimated:YES completion:nil];
} userErrorMsgBlock:^(NSDictionary *errorCodemsg) {
if (errorCodemsg) {
NSString *msg = errorCodemsg[@"msg"];
if (msg) {
GIGA_ShowToast(msg);
}
}
}];
[self dismissViewControllerAnimated:YES completion:nil];
}
//接收注册成功通知
@@ -354,18 +361,57 @@
self.acountTextField.text =(NSString *)noti.object;
}
//密码加密按钮
//短信验证码按钮
-(void)secretBtnAction:(UIButton *)btn{
btn.selected = !btn.selected;
if (btn.selected) {
//秘文
self.passwordTextField.secureTextEntry = YES;
[btn setImage:[UIImage imageNamed:@"btn_tab_notselect"] forState:UIControlStateSelected];
}else{
self.passwordTextField.secureTextEntry = NO;
[btn setImage:[UIImage imageNamed:@"btn_tab_desplay"] forState:UIControlStateNormal];
if (![GiGaHelper isPhoneNumber:self.acountTextField.text]) {
GIGA_ShowToast(@"请输入正确手机号");
return;
}
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
NSString *phoneNumber = self.acountTextField.text;
NSDictionary *param = @{
@"mobile":phoneNumber
};
GiGaBaseAPiRequest *api = [GiGaBaseAPiRequest initWithRequestPath:kApiIUserLoginSendCode method:RequestPostMethod parms:param];
[api requstDataWithResult:^(GiGaAPIResult *result) {
[MBProgressHUD hideHUDForView:self.view animated:YES];
GILog(@"短信获取%@",result.message);
if (result.success) {
[self startTimer:btn];
}else{
GIGA_ShowToast(result.message);
}
}];
}
//短信登录 验证码倒计时
-(void)startTimer:(UIButton *)btn{
btn.userInteractionEnabled = NO;
if (_time>0) {
_timer = [NSTimer scheduledTimerWithTimeInterval:1 count:60 callback:^{
NSString *timeStr=[NSString stringWithFormat:@"%lds",(long)self->_time];
[btn setTitle:timeStr forState:UIControlStateNormal];
self->_time--;
if (self->_time==0) {
[self.secretBtn setTitle:@"发送短信" forState:UIControlStateNormal];
self->_time =60;
btn.userInteractionEnabled = YES;
}
}];
[[NSRunLoop currentRunLoop] addTimer:self.timer forMode:NSRunLoopCommonModes];
}
}
@end
@@ -13,6 +13,7 @@
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="GiGaUserLoginVC">
<connections>
<outlet property="acountTextField" destination="Yiv-h8-4V1" id="bT2-8W-ab2"/>
<outlet property="backScrollView" destination="Z8i-yN-1Cd" id="H0w-vJ-GHh"/>
<outlet property="loginBtn" destination="8Of-JP-gMR" id="uRE-2y-IZt"/>
<outlet property="passwordTextField" destination="Y1I-OE-6t1" id="Jgj-sC-7MX"/>
<outlet property="registBtn" destination="F5p-cf-frr" id="eHE-mU-8Xf"/>
@@ -28,10 +29,10 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Z8i-yN-1Cd">
<rect key="frame" x="0.0" y="20" width="375" height="647"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<subviews>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="手机号码" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="Yiv-h8-4V1">
<rect key="frame" x="65" y="225" width="245" height="48"/>
<rect key="frame" x="65" y="257" width="245" height="48"/>
<constraints>
<constraint firstAttribute="height" constant="48" id="vg0-nn-MyL"/>
</constraints>
@@ -40,30 +41,30 @@
<textInputTraits key="textInputTraits" keyboardType="numberPad"/>
</textField>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qzA-vE-CGR">
<rect key="frame" x="65" y="275" width="245" height="2"/>
<rect key="frame" x="65" y="307" width="245" height="2"/>
<color key="backgroundColor" red="0.94901960784313721" green="0.94901960784313721" blue="0.94901960784313721" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="2" id="4IT-CI-Nj4"/>
</constraints>
</view>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Y1I-OE-6t1">
<rect key="frame" x="65" y="279" width="161" height="48"/>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="验证码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Y1I-OE-6t1">
<rect key="frame" x="65" y="311" width="161" height="48"/>
<constraints>
<constraint firstAttribute="height" constant="48" id="rw6-Ax-vah"/>
</constraints>
<nil key="textColor"/>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="12"/>
<textInputTraits key="textInputTraits" keyboardType="numbersAndPunctuation" secureTextEntry="YES"/>
<textInputTraits key="textInputTraits" keyboardType="numbersAndPunctuation"/>
</textField>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZJU-Uo-5TM">
<rect key="frame" x="65" y="331" width="245" height="2"/>
<rect key="frame" x="65" y="363" width="245" height="2"/>
<color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="2" id="kqB-Hm-kqr"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="chq-bd-6sQ">
<rect key="frame" x="234" y="341" width="76" height="37"/>
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="chq-bd-6sQ">
<rect key="frame" x="234" y="373" width="76" height="37"/>
<constraints>
<constraint firstAttribute="width" constant="76" id="7Tc-Zf-bbN"/>
<constraint firstAttribute="height" constant="37" id="xjD-it-bBa"/>
@@ -77,7 +78,7 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8Of-JP-gMR">
<rect key="frame" x="65" y="386" width="245" height="42"/>
<rect key="frame" x="65" y="418" width="245" height="42"/>
<color key="backgroundColor" red="0.70980392156862748" green="0.054901960784313725" blue="0.054901960784313725" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="42" id="apM-nh-gox"/>
@@ -88,22 +89,27 @@
</state>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Szo-8C-Zin">
<rect key="frame" x="234" y="282" width="76" height="42"/>
<rect key="frame" x="234" y="314" width="76" height="42"/>
<constraints>
<constraint firstAttribute="height" constant="42" id="HyY-eo-8yw"/>
<constraint firstAttribute="width" constant="76" id="pz1-th-22o"/>
</constraints>
<state key="normal" image="btn_tab_desplay"/>
<fontDescription key="fontDescription" name="TimesNewRomanPSMT" family="Times New Roman" pointSize="12"/>
<inset key="titleEdgeInsets" minX="-73" minY="0.0" maxX="0.0" maxY="0.0"/>
<inset key="imageEdgeInsets" minX="5" minY="0.0" maxX="0.0" maxY="0.0"/>
<state key="normal" title="发送验证码" image="btn_meaasag">
<color key="titleColor" red="0.91764705879999997" green="0.30196078430000001" blue="0.30196078430000001" alpha="1" colorSpace="calibratedRGB"/>
</state>
</button>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="img_circle_avatar" translatesAutoresizingMaskIntoConstraints="NO" id="RIl-8E-GcR">
<rect key="frame" x="130.5" y="82" width="114" height="114"/>
<rect key="frame" x="130.5" y="58" width="114" height="114"/>
<constraints>
<constraint firstAttribute="height" constant="114" id="JgO-PU-ypI"/>
<constraint firstAttribute="width" constant="114" id="mG0-1p-gP7"/>
</constraints>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" hasAttributedTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="dnL-WV-spY">
<rect key="frame" x="115.5" y="523" width="144" height="38"/>
<rect key="frame" x="115.5" y="536" width="144" height="38"/>
<constraints>
<constraint firstAttribute="height" constant="38" id="l1O-3i-Plv"/>
<constraint firstAttribute="width" constant="144" id="zzO-p2-ENu"/>
@@ -121,11 +127,11 @@
</attributedString>
</state>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="F5p-cf-frr">
<rect key="frame" x="107" y="436" width="161" height="40"/>
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="F5p-cf-frr">
<rect key="frame" x="80" y="373" width="55" height="36"/>
<constraints>
<constraint firstAttribute="width" constant="161" id="EU3-ax-K1r"/>
<constraint firstAttribute="height" constant="40" id="W9a-lX-GbY"/>
<constraint firstAttribute="width" constant="55" id="E7Z-DH-nia"/>
<constraint firstAttribute="height" constant="36" id="n0h-RT-Hkh"/>
</constraints>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="12"/>
<state key="normal" title="创建账号">
@@ -134,14 +140,12 @@
</button>
</subviews>
<constraints>
<constraint firstItem="RIl-8E-GcR" firstAttribute="top" secondItem="Z8i-yN-1Cd" secondAttribute="top" constant="82" id="4Ud-t0-vg5"/>
<constraint firstItem="RIl-8E-GcR" firstAttribute="top" secondItem="Z8i-yN-1Cd" secondAttribute="top" constant="58" id="4Ud-t0-vg5"/>
<constraint firstItem="chq-bd-6sQ" firstAttribute="top" secondItem="ZJU-Uo-5TM" secondAttribute="bottom" constant="8" id="4uH-Hy-3Ai"/>
<constraint firstItem="RIl-8E-GcR" firstAttribute="centerX" secondItem="Yiv-h8-4V1" secondAttribute="centerX" id="7Xu-ux-Onh"/>
<constraint firstItem="chq-bd-6sQ" firstAttribute="trailing" secondItem="ZJU-Uo-5TM" secondAttribute="trailing" id="AYA-eD-1K2"/>
<constraint firstItem="ZJU-Uo-5TM" firstAttribute="leading" secondItem="8Of-JP-gMR" secondAttribute="leading" id="B8L-kP-kUe"/>
<constraint firstItem="F5p-cf-frr" firstAttribute="top" secondItem="8Of-JP-gMR" secondAttribute="bottom" constant="8" id="Frt-kl-gMg"/>
<constraint firstItem="qzA-vE-CGR" firstAttribute="top" secondItem="Yiv-h8-4V1" secondAttribute="bottom" constant="2" id="L0e-cp-tPg"/>
<constraint firstItem="RIl-8E-GcR" firstAttribute="centerX" secondItem="F5p-cf-frr" secondAttribute="centerX" id="Moz-Pn-3O3"/>
<constraint firstItem="ZJU-Uo-5TM" firstAttribute="width" secondItem="qzA-vE-CGR" secondAttribute="width" id="Mpu-H1-Myf"/>
<constraint firstItem="Szo-8C-Zin" firstAttribute="centerY" secondItem="Y1I-OE-6t1" secondAttribute="centerY" id="O8A-1t-51Q"/>
<constraint firstItem="Y1I-OE-6t1" firstAttribute="top" secondItem="qzA-vE-CGR" secondAttribute="bottom" constant="2" id="P0X-8h-DcU"/>
@@ -152,11 +156,13 @@
<constraint firstItem="chq-bd-6sQ" firstAttribute="trailing" secondItem="8Of-JP-gMR" secondAttribute="trailing" id="XtD-fx-sr4"/>
<constraint firstItem="Y1I-OE-6t1" firstAttribute="leading" secondItem="ZJU-Uo-5TM" secondAttribute="leading" id="Y9N-XV-3ir"/>
<constraint firstItem="Yiv-h8-4V1" firstAttribute="leading" secondItem="Z8i-yN-1Cd" secondAttribute="leading" constant="65" id="Yd4-bz-xUn"/>
<constraint firstItem="dnL-WV-spY" firstAttribute="top" secondItem="8Of-JP-gMR" secondAttribute="bottom" constant="76" id="Ziq-Ha-5FS"/>
<constraint firstItem="F5p-cf-frr" firstAttribute="leading" secondItem="ZJU-Uo-5TM" secondAttribute="leading" constant="15" id="ddi-4p-s0s"/>
<constraint firstItem="Szo-8C-Zin" firstAttribute="leading" secondItem="Y1I-OE-6t1" secondAttribute="trailing" constant="8" id="lp1-dg-UCs"/>
<constraint firstItem="dnL-WV-spY" firstAttribute="top" secondItem="F5p-cf-frr" secondAttribute="bottom" constant="47" id="mjV-eX-FF7"/>
<constraint firstAttribute="bottom" secondItem="dnL-WV-spY" secondAttribute="bottom" constant="86" id="ooQ-OL-P5e"/>
<constraint firstItem="Yiv-h8-4V1" firstAttribute="top" secondItem="RIl-8E-GcR" secondAttribute="bottom" constant="29" id="p63-hU-APq"/>
<constraint firstAttribute="bottom" secondItem="dnL-WV-spY" secondAttribute="bottom" constant="29" id="ooQ-OL-P5e"/>
<constraint firstItem="Yiv-h8-4V1" firstAttribute="top" secondItem="RIl-8E-GcR" secondAttribute="bottom" constant="85" id="p63-hU-APq"/>
<constraint firstAttribute="trailing" secondItem="Yiv-h8-4V1" secondAttribute="trailing" constant="65" id="phk-GT-PvS"/>
<constraint firstItem="F5p-cf-frr" firstAttribute="top" secondItem="ZJU-Uo-5TM" secondAttribute="bottom" constant="8" id="qqc-dh-O24"/>
<constraint firstItem="dnL-WV-spY" firstAttribute="centerX" secondItem="Z8i-yN-1Cd" secondAttribute="centerX" id="rMH-NL-gTu"/>
<constraint firstItem="qzA-vE-CGR" firstAttribute="width" secondItem="Yiv-h8-4V1" secondAttribute="width" id="rUt-lu-gtM"/>
<constraint firstItem="8Of-JP-gMR" firstAttribute="top" secondItem="chq-bd-6sQ" secondAttribute="bottom" constant="8" id="u7n-Dz-uJc"/>
@@ -172,14 +178,14 @@
<constraint firstItem="Z8i-yN-1Cd" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="Gug-bY-bRv"/>
<constraint firstItem="1vd-yc-0a5" firstAttribute="bottom" secondItem="Z8i-yN-1Cd" secondAttribute="bottom" id="TXU-c3-0M6"/>
<constraint firstAttribute="trailing" secondItem="Z8i-yN-1Cd" secondAttribute="trailing" id="UyN-ah-Reu"/>
<constraint firstItem="Z8i-yN-1Cd" firstAttribute="top" secondItem="1vd-yc-0a5" secondAttribute="top" id="bbt-Lx-gQG"/>
<constraint firstItem="Z8i-yN-1Cd" firstAttribute="top" secondItem="1vd-yc-0a5" secondAttribute="top" constant="-20" id="bbt-Lx-gQG"/>
</constraints>
<viewLayoutGuide key="safeArea" id="1vd-yc-0a5"/>
<point key="canvasLocation" x="-84.5" y="-2.5"/>
<point key="canvasLocation" x="-85.599999999999994" y="-3.1484257871064472"/>
</view>
</objects>
<resources>
<image name="btn_tab_desplay" width="45" height="20"/>
<image name="btn_meaasag" width="76" height="22"/>
<image name="btn_wechat" width="126" height="25"/>
<image name="img_circle_avatar" width="114" height="114"/>
</resources>
@@ -79,17 +79,13 @@
GIGA_ShowToast(@"请输入正确手机号");
return;
}
btn.userInteractionEnabled = NO;
[self startTimer:btn];
[self requstCode:btn];
}
//计时
-(void)startTimer:(UIButton *)btn{
btn.userInteractionEnabled = NO;
if (_time>0) {
_timer = [NSTimer scheduledTimerWithTimeInterval:1 count:60 callback:^{
NSString *timeStr=[NSString stringWithFormat:@"%lds",(long)self->_time];
@@ -123,10 +119,12 @@
NSDictionary *params = @{@"mobile":self.phoneNumberTextField.text};
GiGaBaseAPiRequest *requst = [GiGaBaseAPiRequest initWithRequestPath:@"msg/sms/v1/retrievesendcode" method:RequestPostMethod parms:params];
[requst requstDataWithResult:^(GiGaAPIResult *result) {
btn.userInteractionEnabled = YES;
[self.view hideToastActivity];
GIGA_ShowToast(result.message);
if (result.success) {
//成功后再开始倒计时
[self startTimer:btn];
}
}];
}
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.14"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
@@ -65,7 +65,7 @@
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="w3j-WU-gmW">
<rect key="frame" x="87" y="252.5" width="200" height="41"/>
<rect key="frame" x="87" y="252.5" width="201" height="41"/>
<color key="backgroundColor" red="0.70980392156862748" green="0.054901960784313725" blue="0.054901960784313725" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="41" id="q8T-c9-PAl"/>
@@ -124,7 +124,7 @@
<constraint firstItem="MHD-nb-UXj" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="wco-Sk-bTY"/>
</constraints>
<viewLayoutGuide key="safeArea" id="g7Z-wI-UmZ"/>
<point key="canvasLocation" x="33.5" y="53.5"/>
<point key="canvasLocation" x="-161" y="36"/>
</view>
</objects>
<resources>
@@ -18,9 +18,13 @@
#import "GiGaShareModel.h"
#import "UIImageView+WebCache.h"
#import "UIButton+WebCache.h"
#import "GiGaUserInfoVC.h"
#import "GIGaSharePageViewController.h"
@interface GIGaMaskShareViewController ()<UIImagePickerControllerDelegate,UINavigationControllerDelegate>
@property(nonatomic,strong) GiGaShareModel *model;
@property(nonatomic,strong)NSMutableArray *viewControllers;
@end
@implementation GIGaMaskShareViewController
@@ -51,7 +55,7 @@
rightBtn.layer.masksToBounds = YES;
rightBtn.layer.cornerRadius = 20;
[rightBtn setImage:[UIImage imageNamed:@"nav_circle_avatar"] forState:UIControlStateNormal];
[rightBtn addTarget:self action:@selector(goUserInfoView) forControlEvents:UIControlEventTouchUpInside];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:rightBtn];
if ([[[UIDevice currentDevice] systemVersion] doubleValue] >= 11.0) {
@@ -74,6 +78,12 @@
}
}
-(void)goUserInfoView{
GiGaUserInfoVC *userVC= [[GiGaUserInfoVC alloc] init];
[self.navigationController pushViewController:userVC animated:YES];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
@@ -98,7 +108,9 @@
cell.minuteLab.text = [NSString stringWithFormat:@"%@min",self.model.minute];
cell.timeLable.text = [NSString stringWithFormat:@"这是您敷面膜的第:%@张",self.model.monthMaskNum];
if (self.model.productImgUrl && ![self.model.productImgUrl isKindOfClass:[NSNull class]]) {
[cell.holdImagView sd_setImageWithURL:[NSURL URLWithString:self.model.productImgUrl]];
//[cell.holdImagView sd_setImageWithURL:[NSURL URLWithString:self.model.productImgUrl]];
[cell.holdImagView sd_setImageWithURL:[NSURL URLWithString:self.model.productImgUrl] placeholderImage:[UIImage imageNamed:@"img_product"]];
}
}
@@ -170,9 +182,9 @@
case 1:
{
//系统
[GIGaUserFileHelper delectShareImage:kUSERSHAREA_IMAGENAME];
ShareViewController *share = [[ShareViewController alloc] init];
share.model = self.model;
//[GIGaUserFileHelper delectShareImage:kUSERSHAREA_IMAGENAME];
GIGaSharePageViewController *share = [[GIGaSharePageViewController alloc] initWithControllers:self.viewControllers];
//share.model = self.model;
[self presentViewController:share animated:NO completion:nil];
}
@@ -191,12 +203,43 @@
}
- (NSMutableArray *)viewControllers {
if (!_viewControllers) {
_viewControllers = [NSMutableArray array];
NSArray *descArr = @[@"生活不易,必须美丽",@"长夜漫漫,不如面膜时间",@"敷片面膜,人间值得",@"打开面膜时间,撰写你与美丽的故事",@"人越美丽,责任越大",@"吃得苦中苦,方为人上人",@"该放弃的决不挽留,该留住的决不放手"];
NSArray *images = @[@"sharebg_1",@"sharebg_2",@"sharebg_3",@"sharebg_4",@"sharebg_5",@"sharebg_6",@"sharebg_7"];
NSArray *shareimages = @[@"share_oneblack",@"share_one",@"share_one",@"share_one",@"share_one",@"share_one",@"share_one"];
NSArray *desColor = @[@1,@1,@2,@1,@1,@1,@2];
NSArray*doingcolorS = @[@2,@3,@2,@2,@2,@2,@2];
for (int i = 0; i <descArr.count; i++) {
ShareViewController *vc = [[ShareViewController alloc] init];
GiGaLoaclImageModel *model = [[GiGaLoaclImageModel alloc] init];
model.desc = descArr[i];
model.localImageName = images[i];
model.shareLabeimageName = shareimages[i];
model.doingColorflag = [doingcolorS[i] integerValue];
model.descColorflag = [desColor[i] integerValue];
vc.localModel = model;
vc.model = self.model;
[_viewControllers addObject:vc];
}
}
return _viewControllers;
}
#pragma mark share
-(void)shareBtnAction{
ShareViewController *share = [[ShareViewController alloc] init];
share.model = self.model;
[self presentViewController:share animated:YES completion:nil];
GIGaSharePageViewController *share = [[GIGaSharePageViewController alloc] initWithControllers:self.viewControllers];
//share.model = self.model;
[self presentViewController:share animated:NO completion:nil];
// ShareViewController *share = [[ShareViewController alloc] init];
// share.model = self.model;
// [self presentViewController:share animated:YES completion:nil];
//
}
@@ -213,19 +256,13 @@
}else{
NSString *errorStr = @"应用相册限受限,请在设置中启用";
NSString *errorStr = @"应用相册限受限,请在设置中启用";
[self jxt_showAlertWithTitle:@"" message:errorStr appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
alertMaker.addActionCancelTitle(@"取消");
alertMaker.addActionDefaultTitle(@"去开启");
alertMaker.addActionCancelTitle(@"知道了");
//alertMaker.addActionDefaultTitle(@"去开启");
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
if (buttonIndex == 1) {
NSURL *url = [NSURL URLWithString:@"prefs:root=Photos"];
if ([[UIApplication sharedApplication] canOpenURL:url]) {
[[UIApplication sharedApplication] openURL:url];
}
}
}];
}
@@ -242,21 +279,12 @@
if(authStatus == AVAuthorizationStatusRestricted || authStatus == AVAuthorizationStatusDenied){
NSString *errorStr = @"应用相机权限受限,请在设置中启用";
[self jxt_showAlertWithTitle:@"" message:errorStr appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
alertMaker.addActionCancelTitle(@"取消");
alertMaker.addActionDefaultTitle(@"去开启");
alertMaker.addActionCancelTitle(@"知道了");
//alertMaker.addActionDefaultTitle(@"去开启");
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
if (buttonIndex == 1) {
NSString *urlStr = @"App-Prefs:root=Photos";
if (@available(iOS 10.0, *)) {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlStr] options:@{} completionHandler:nil];
} else {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlStr]];
// Fallback on earlier versions
}
}
}];
return;
}
@@ -289,7 +317,6 @@
-(void)requestshareInfo{
if (self.maskTimeId == nil) {
return;
}
@@ -0,0 +1,18 @@
//
// GIGaSharePageViewController.h
// GIGA
//
// Created by lianxiang on 2018/10/12.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <UIKit/UIKit.h>
//#import "GiGaShareModel.h"
@interface GIGaSharePageViewController : UIViewController
//@property(nonatomic,strong) GiGaShareModel *model;
- (instancetype)initWithControllers:(NSArray *)viewControllers;
@end
@@ -0,0 +1,153 @@
//
// GIGaSharePageViewController.m
// GIGA
//
// Created by lianxiang on 2018/10/12.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import "GIGaSharePageViewController.h"
@interface GIGaSharePageViewController ()<UIPageViewControllerDataSource,UIPageViewControllerDelegate,UIScrollViewDelegate>
{
BOOL _done; //是否翻页完成
NSInteger _currentPage;//当前控制器对应下标
}
@property(nonatomic,strong) UIPageViewController *pageVC;
//@property(nonatomic,strong) NSArray *titles;
@property(nonatomic,strong) NSArray *viewControllers;
@property(nonatomic,strong) UIPageControl *pageControl;
@end
@implementation GIGaSharePageViewController
- (UIPageControl *)pageControl{
if (!_pageControl) {
_pageControl = [[UIPageControl alloc] init];
_pageControl.frame = CGRectMake(KMainW / 2 - 100, KMainH - 20, 200, 20);
_pageControl.numberOfPages = self.viewControllers.count;
_pageControl.hidesForSinglePage = YES;
_pageControl.userInteractionEnabled = NO;
}
return _pageControl;
}
- (instancetype)initWithControllers:(NSArray *)viewControllers{
self = [super init];
if (self) {
self.viewControllers = viewControllers;
}
return self;
}
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor whiteColor];
// Do any additional setup after loading the view.
[self addChildViewController:self.pageVC];
[self.view addSubview:self.pageVC.view];
[self.view addSubview:self.pageControl];
}
#pragma mark - UIPageViewControllerDataSource
// 返回下一个ViewController对象
- (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerAfterViewController:(UIViewController *)viewController {
NSUInteger index = [self indexOfViewController:viewController];
if (index == NSNotFound) {
return nil;
}
index++;
if (index == [self.viewControllers count]) {
return nil;
}
return self.viewControllers[index];
}
// 返回上一个ViewController对象
- (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerBeforeViewController:(UIViewController *)viewController {
NSUInteger index = [self indexOfViewController:viewController];
if (index == 0 || index == NSNotFound) {
return nil;
}
index--;
return self.viewControllers[index];
}
#pragma mark - UIPageViewControllerDelegate
// 开始翻页调用
- (void)pageViewController:(UIPageViewController *)pageViewController willTransitionToViewControllers:(NSArray<UIViewController *> *)pendingViewControllers NS_AVAILABLE_IOS(6_0) {
NSLog(@"开始翻页");
}
// 翻页完成调用
- (void)pageViewController:(UIPageViewController *)pageViewController didFinishAnimating:(BOOL)finished previousViewControllers:(NSArray<UIViewController *> *)previousViewControllers transitionCompleted:(BOOL)completed {
_done = YES;
NSInteger index = [self.viewControllers indexOfObject:pageViewController.viewControllers[0]];
_currentPage = index;
[_pageControl setCurrentPage:_currentPage];
NSLog(@"翻页完成");
}
-(UIInterfaceOrientation)pageViewControllerPreferredInterfaceOrientationForPresentation:(UIPageViewController *)pageViewController NS_AVAILABLE_IOS(7_0) __TVOS_PROHIBITED {
return UIInterfaceOrientationPortrait;
}
#pragma mark - Tool
// 根据数组元素,得到下标值
- (NSUInteger)indexOfViewController:(UIViewController *)viewControlller {
return [self.viewControllers indexOfObject:viewControlller];
}
#pragma mark - SCrollViewDelegate
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
// LOG(@"滚动 = %f", scrollView.contentOffset.x-SCREEN_WIDTH);
//CGFloat offsetX = scrollView.contentOffset.x-KMainW;
if (!_done) {
[_pageControl setCurrentPage:_currentPage];
}else
{
_done = NO;
}
}
- (UIPageViewController *)pageVC {
if (!_pageVC) {
_pageVC = [[UIPageViewController alloc] initWithTransitionStyle:UIPageViewControllerTransitionStyleScroll navigationOrientation:UIPageViewControllerNavigationOrientationHorizontal options:nil];
_pageVC.dataSource = self;
_pageVC.delegate = self;
_pageVC.view.frame = CGRectMake(0,0,KMainW, KMainH);
for (UIView *subview in _pageVC.view.subviews) {
[(UIScrollView *)subview setDelegate:self];
//设置是否支持手势滑动
// [(UIScrollView *)subview setScrollEnabled:NO];
}
[_pageVC setViewControllers:@[self.viewControllers[0]] direction:UIPageViewControllerNavigationDirectionForward animated:YES completion:nil];
}
return _pageVC;
}
@end
+162 -26
View File
@@ -9,77 +9,198 @@
#import "GiGaAppGaurdVC.h"
#import "Masonry.h"
#import "GiGaUserDefault.h"
#import "GiGaPageControl.h"
#import "LXPageControl.h"
@interface GiGaAppGaurdVC ()
@interface GiGaAppGaurdVC ()<UIScrollViewDelegate>
@property(nonatomic,strong) LXPageControl *pagControl;
@property(nonatomic,strong)UIScrollView * scrollView;
@end
@implementation GiGaAppGaurdVC
- (LXPageControl *)pagControl
{
if (!_pagControl) {
_pagControl = [[LXPageControl alloc] initWithFrame:CGRectMake(0, KMainH - 63 - PhoneX_BottomMargin, KMainW, 8)];
_pagControl.numberOfPages = 3;
_pagControl.currentPage = 0;
}
return _pagControl;
}
- (UIScrollView *)scrollView
{
if (!_scrollView) {
_scrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height)];
_scrollView.backgroundColor = [UIColor redColor];
_scrollView.pagingEnabled=true;
_scrollView.delegate=self;
_scrollView.showsHorizontalScrollIndicator=false;
_scrollView.showsVerticalScrollIndicator=false;
}
return _scrollView;
}
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
self.view.backgroundColor = [UIColor blueColor];
self.view.backgroundColor = [UIColor blackColor];
[GiGaUserDefault saveAppGaurdflag:YES];
[self creatUI];
[self creatSubs];
}
-(void)creatUI{
//MARK: - scrollView delegate
//结束滚动
-(void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView{
[self updatePage];
}
-(void)updatePage{
self.pagControl.currentPage = self.scrollView.contentOffset.x / self.scrollView.bounds.size.width;
self.pagControl.hidden = self.scrollView.contentOffset.x / self.scrollView.bounds.size.width == 2 ? YES : NO;
GILog(@"%ld",self.pagControl.currentPage);
}
-(void)creatSubs{
[self.view addSubview:self.scrollView];
[self.view addSubview:self.pagControl];
self.scrollView.contentSize = CGSizeMake(self.scrollView.bounds.size.width*self.pagControl.numberOfPages, self.scrollView.bounds.size.height);
self.scrollView.bounces=NO;
for (int i=0; i<3; i++) {
UIView *pageView = [[UIView alloc] init];
pageView.backgroundColor = [UIColor blueColor];
pageView.frame = CGRectMake(i*self.scrollView.bounds.size.width, 0, self.scrollView.bounds.size.width, self.scrollView.bounds.size.height);
[self.scrollView addSubview:pageView];
if (i==0) {
[self creatFirstPage:pageView];
}else if (i==1){
[self creat2Page:pageView];
}else if (i==2){
[self creat3Page:pageView];
}
}
[self creatcommonView];
}
-(void)creatFirstPage:(UIView *)inView{
UIImageView *backimage = [[UIImageView alloc] init];
backimage.image = [UIImage imageNamed:@"appgaurd_bg"];
backimage.frame = CGRectMake(0, 0, KMainW, KMainH);
//backimage.contentMode = UIViewContentModeScaleToFill;
[self.view addSubview:backimage];
[inView addSubview:backimage];
[backimage mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.view.mas_top);
make.bottom.mas_equalTo(self.view.mas_bottom);
make.left.mas_equalTo(self.view.mas_left);
make.right.mas_equalTo(self.view.mas_right);
make.top.mas_equalTo(inView.mas_top);
make.bottom.mas_equalTo(inView.mas_bottom);
make.left.mas_equalTo(inView.mas_left);
make.right.mas_equalTo(inView.mas_right);
}];
UIImageView *girlimage = [[UIImageView alloc] init];
girlimage.image = [UIImage imageNamed:@"appgaurd_woman"];
[self.view addSubview:girlimage];
[inView addSubview:girlimage];
girlimage.contentMode = UIViewContentModeScaleAspectFit;
[girlimage mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.view.mas_top).offset(104 + PhoneX_TopMargin);
make.centerX.mas_equalTo(self.view.mas_centerX);
make.top.mas_equalTo(inView.mas_top).offset(104 + PhoneX_TopMargin);
make.centerX.mas_equalTo(inView.mas_centerX);
}];
UIImageView *moonimage = [[UIImageView alloc] init];
moonimage.image = [UIImage imageNamed:@"appgaurd_moon"];
[self.view addSubview:moonimage];
[inView addSubview:moonimage];
[moonimage mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.view.mas_top).offset(13 + PhoneX_TopMargin);
make.right.mas_equalTo(self.view.mas_right).offset(-5.5);
make.top.mas_equalTo(inView.mas_top).offset(13 + PhoneX_TopMargin);
make.right.mas_equalTo(inView.mas_right).offset(-24);
}];
}
-(void)creat2Page:(UIView *)inView{
UIImageView *backimage = [[UIImageView alloc] init];
backimage.image = [UIImage imageNamed:@"page2_img"];
backimage.frame = CGRectMake(0, 0, KMainW, KMainH);
//backimage.contentMode = UIViewContentModeScaleToFill;
[inView addSubview:backimage];
UIImageView *girlimage = [[UIImageView alloc] init];
girlimage.image = [UIImage imageNamed:@"page2_women"];
[inView addSubview:girlimage];
girlimage.contentMode = UIViewContentModeScaleAspectFit;
[girlimage mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(inView.mas_top).offset(104 + PhoneX_TopMargin);
make.centerX.mas_equalTo(inView.mas_centerX);
}];
UIImageView *moonimage = [[UIImageView alloc] init];
moonimage.image = [UIImage imageNamed:@"appgaurd_moon"];
[inView addSubview:moonimage];
[moonimage mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(inView.mas_top).offset(13 + PhoneX_TopMargin);
make.right.mas_equalTo(inView.mas_right).offset(-24);
}];
}
-(void)creat3Page:(UIView *)inView{
UIImageView *backimage = [[UIImageView alloc] init];
backimage.image = [UIImage imageNamed:@"page3_img"];
backimage.frame = CGRectMake(0, 0, KMainW, KMainH);
//backimage.contentMode = UIViewContentModeScaleToFill;
[inView addSubview:backimage];
UIImageView *girlimage = [[UIImageView alloc] init];
girlimage.image = [UIImage imageNamed:@"page3_woman"];
[inView addSubview:girlimage];
girlimage.contentMode = UIViewContentModeScaleAspectFit;
[girlimage mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(inView.mas_top).offset(104 + PhoneX_TopMargin);
make.centerX.mas_equalTo(inView.mas_centerX);
}];
UIImageView *logoimage = [[UIImageView alloc] init];
logoimage.image = [UIImage imageNamed:@"page_logo"];
[inView addSubview:logoimage];
[logoimage mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(inView.mas_top).offset(13 + PhoneX_TopMargin);
make.right.mas_equalTo(inView.mas_right).offset(-24);
}];
UIButton *dismisBtn= [UIButton buttonWithType:UIButtonTypeCustom];
[dismisBtn setTitle:@"立即体验" forState:UIControlStateNormal];
//dismisBtn.backgroundColor = [UIColor greenColor];
[dismisBtn addTarget:self action:@selector(dismisBtnAction) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:dismisBtn];
[inView addSubview:dismisBtn];
[dismisBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(160);
make.height.mas_equalTo(40);
make.centerX.mas_equalTo(self.view.mas_centerX);
make.bottom.mas_equalTo(self.view.mas_bottom).offset(-100);
make.top.mas_greaterThanOrEqualTo(girlimage.mas_bottom).offset(20);
make.centerX.mas_equalTo(inView.mas_centerX);
make.bottom.mas_equalTo(inView.mas_bottom).offset(-100);
make.top.mas_greaterThanOrEqualTo(girlimage.mas_bottom).offset(20);
}];
dismisBtn.layer.masksToBounds = YES;
@@ -88,6 +209,21 @@
dismisBtn.layer.borderColor = [UIColor whiteColor].CGColor;
}
-(void)creatcommonView{
// UIImageView *moonimage = [[UIImageView alloc] init];
// moonimage.image = [UIImage imageNamed:@"appgaurd_moon"];
// [self.view addSubview:moonimage];
//
// [moonimage mas_makeConstraints:^(MASConstraintMaker *make) {
// make.top.mas_equalTo(self.view.mas_top).offset(13 + PhoneX_TopMargin);
// make.right.mas_equalTo(self.view.mas_right).offset(-24);
//
// }];
UIView *botomlineView = [[UIView alloc] init];
botomlineView.backgroundColor = [UIColor whiteColor];
[self.view addSubview:botomlineView];
@@ -19,6 +19,8 @@
#import "LXCustomSwith.h"
#import "GiGaUserDefault.h"
#import "GiGaServerConfig.h"
#import "GiGaQuestionVC.h"
#import "GiGaBaseAPiRequest.h"
//弹幕控制器
@interface GiGaFlingCommitVC ()
@@ -28,6 +30,9 @@
//@property (nonatomic,strong) LXCustomSwith *danmuSwitch;
//开启弹幕按钮
@property(nonatomic,strong) UIButton *openDanmuButton;
@property(nonatomic,strong) UIButton *testBtn;
@end
@implementation GiGaFlingCommitVC
@@ -51,6 +56,32 @@
//
//}
- (UIButton *)testBtn
{
if (!_testBtn) {
_testBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_testBtn setTitle:@"" forState:UIControlStateNormal];
[_testBtn addTarget:self action:@selector(testBtnAction) forControlEvents:UIControlEventTouchUpInside];
//_testBtn.backgroundColor = [UIColor redColor];
_testBtn.frame = CGRectMake(30, 476 + PhoneX_TopMargin,KMainW - 30 *2, 50);
}
return _testBtn;
}
-(void)testBtnAction{
//GIGA_ShowToast(@"请先关闭弹幕");
[self dismissViewControllerAnimated:YES completion:^{
[[LXDanMuManager shareInstance] destory];
[self destorySocket];
NC_POST_NAME_OBJECT(@"UserCloseChatRoomAction", nil);
NC_POST_NAME_OBJECT(@"flingcommitViewTestAreaAction", nil);
}];
}
- (UIButton *)openDanmuButton{
if (!_openDanmuButton) {
_openDanmuButton = [UIButton buttonWithType:UIButtonTypeCustom];
@@ -118,17 +149,25 @@
- (void)viewDidLoad {
[super viewDidLoad];
[self.view addSubview:self.testBtn];
// Do any additional setup after loading the view.
[self.view addSubview: self.commitInputView];
// [self.view addSubview:self.danmuSwitch];
// [self.view bringSubviewToFront:self.danmuSwitch];
[self.view addSubview:self.openDanmuButton];
[self.view addSubview:self.testBtn];
weakify(self);
self.commitInputView.SendCommentHandler = ^(NSString *content) {
GILog(@"发送->:%@",content);
BOOL isUserLogin = [GiGaUserDefault isUserLogin];
if (!isUserLogin) {
[GiGaBaseAPiRequest userTokenTimeOutGologinFromVC:weakSelf];
return ;
}
NSArray *arr = @[@{
@"content":content,
@"room":@"",
@@ -143,11 +182,8 @@
//socket
[self connetction];
//显示隐藏输入框
BOOL isUserLogin = [GiGaUserDefault isUserLogin];
if (!isUserLogin) {
self.commitInputView.hidden = YES;
}
}
@@ -35,11 +35,14 @@
#import "GIGaMaskShareViewController.h"
#import "MaskHistryRecord.h"
#import "MaskTimeTopAnimationView.h"
#import <AudioToolbox/AudioToolbox.h>
#import "GIGaDateHelper.h"
@interface GiGaMaskTaskViewController ()<MaskCirCularProGressViewDelegate,MaskTimeTextViewDelegate>
{
AVAudioPlayer *_musicPalyer;
AVAudioPlayer *_startMaskMusic;
}
@property (nonatomic,strong) UIButton *rightNavUserBtn;
@@ -68,7 +71,7 @@
- (MaskTimeTopAnimationView *)animLabeview{
if (!_animLabeview) {
_animLabeview = [[MaskTimeTopAnimationView alloc] initWithFrame:CGRectMake(0,20+ PhoneX_TopMargin,KMainW - 40 * 2, 44)];
NSString *text = @"长时间的使用面膜可能会对您的皮肤造成伤害";
NSString *text = @"配合测试结果的时间敷面膜效果更好哦";
[_animLabeview animationWithTexts:[NSArray arrayWithObjects:text,@"面膜时间",text, nil]];
//_animLabeview.backgroundColor = [UIColor blueColor];
@@ -123,7 +126,6 @@
return _hairImageView;
}
//人脸
- (UIImageView *)faceView{
if (!_faceView) {
@@ -177,10 +179,19 @@
if (!_startTestButton) {
_startTestButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_startTestButton setBackgroundImage:[UIImage imageNamed:@"btn_start_test"] forState:UIControlStateNormal];
NSAttributedString *title = [GiGaHelper stringWithText:@"测试肤质" textColor:[UIColor whiteColor] textFont:GIGA_TEXTFONTBOLD(18) leterSpace:0];
BOOL istest = [GiGaUserDefault isUserTest];
NSString *text = nil;
if (istest) {
text = @"重新测试";
}else{
text = @"测试肤质";
}
NSAttributedString *title = [GiGaHelper stringWithText:text textColor:[UIColor whiteColor] textFont:GIGA_TEXTFONTBOLD(18) leterSpace:0];
[_startTestButton setAttributedTitle:title forState:UIControlStateNormal];
[_startTestButton addTarget:self action:@selector(testBtnAcion:) forControlEvents:UIControlEventTouchUpInside];
}
return _startTestButton;
}
@@ -196,27 +207,27 @@
#pragma mark 弹幕
-(void)createInputView{
GiGaFlingCommitVC* GiGaFlingVC = [[GiGaFlingCommitVC alloc] init];
if (ISIOS8) {
GiGaFlingVC.modalPresentationStyle = UIModalPresentationOverCurrentContext;
}else{
GiGaFlingVC.modalPresentationStyle = UIModalPresentationCurrentContext;
}
GiGaFlingVC.view.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.3];
GiGaFlingVC.view.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.4];
[self presentViewController:GiGaFlingVC animated:NO completion:nil];
}
#pragma mark - 生命周期
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
//取消导航对内容下移影响
[self.navigationController.navigationBar setTranslucent:YES];
}
-(void)viewDidAppear:(BOOL)animated{
[super viewDidAppear:animated];
if([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
@@ -229,12 +240,12 @@
if (showAppGaurd == NO) {
[self showAPPappGaurdView];
}
// [self showUserGaurdView];
}
-(void)viewWillDisappear:(BOOL)animated{
[super viewWillDisappear:animated];
[self.navigationController.navigationBar setTranslucent:NO];
if([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
@@ -248,7 +259,25 @@
[self setUpNav];
[self initUI];
[self addNotify];
[self creatBackGroundMusic];
//[self creatBackGroundMusic];
[self creatMaskTimeSatrtMusic];
//判断是否有倒数计时
[self digIsMasking];
}
-(void)digIsMasking{
AppDelegate *delegate =(AppDelegate *) [[UIApplication sharedApplication] delegate];
NSString *st = nil;
if (delegate.isMasking) {
NSLog(@"倒计时中");
st = @"YES";
[self animaMask];
}else{
st = @"NO";
}
}
@@ -257,7 +286,7 @@
-(void)maskupSwipeGesture{
[self animaMask];
}
#pragma mark 点击手势
#pragma mark 点击手势面膜时间
-(void)maskTapAction{
[self animaMask];
}
@@ -275,18 +304,19 @@
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
if (buttonIndex == 1) {
[self.cicleProgressView stop];
//手动结束时结束peding通知
[[GiGaLocalNotificationManager localNotifiationCenter] cancelAllLocalNoitification];
[GIGaDateHelper removeStartDate];
[GIGaDateHelper saveisMaskingflag:NO];
[self maskTimeEnd];
}
}];
}
#pragma mark - 开始面膜时间动画 合并
-(void)animaMask{
self.swipeGaurdimagView.hidden = YES;
self.startMaskButton.hidden = YES;
[self.view layoutIfNeeded];
@@ -304,7 +334,6 @@
make.top.mas_equalTo(self.attachPoint.y - 87);
}];
[self.maskImageView setImage:[UIImage imageNamed:@"masking_img_mask"]];
[self.view layoutIfNeeded];
@@ -348,7 +377,6 @@
self.cicleProgressView.hidden = YES;
self.swipeGaurdimagView.hidden = NO;
self.startMaskButton.hidden = NO;
[self.view layoutIfNeeded];
[UIView animateWithDuration:1.0 animations:^{
@@ -463,12 +491,28 @@
NSError *payerError;
NSURL *musicUrl = [[NSURL alloc] initWithString:[[NSBundle mainBundle] pathForResource:@"pomodoSound" ofType:@"m4a"]] ;
AVAudioPlayer *player = [[AVAudioPlayer alloc] initWithContentsOfURL:musicUrl error:&payerError];
player.numberOfLoops = -1;
_musicPalyer = player;
player.numberOfLoops = -1;//-1 无限
player.volume = 0;
//_musicPalyer = player;
[[AVAudioSession sharedInstance] setActive:YES error:nil];
//设置后台模式和锁屏模式下依然能够播放
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback withOptions:AVAudioSessionCategoryOptionMixWithOthers error:nil];
}
#pragma mark 开始面膜时间提示音🎵
-(void)creatMaskTimeSatrtMusic{
//初始化音频播放器
NSError *payerError;
NSURL *musicUrl = [[NSURL alloc] initWithString:[[NSBundle mainBundle] pathForResource:@"ogg_btn" ofType:@"mp3"]] ;
AVAudioPlayer *player = [[AVAudioPlayer alloc] initWithContentsOfURL:musicUrl error:&payerError];
player.numberOfLoops = 2;
player.volume = 0.5;
_startMaskMusic = player;
[[AVAudioSession sharedInstance] setActive:YES error:nil];
//设置后台模式和锁屏模式下依然能够播放
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback withOptions:AVAudioSessionCategoryOptionMixWithOthers error:nil];
}
#pragma mark 开始面膜时间
@@ -478,22 +522,19 @@
[self sendBengainMaskTime];
[self createInputView]; //出现弹幕
AppDelegate *delegate =(AppDelegate *) [[UIApplication sharedApplication] delegate];
if (delegate.isMasking) {
return;
}
delegate.isMasking = YES;
[_musicPalyer play];
[self setBackGroundPlayingInfo];//锁屏音频信息
//总时间隔 s
NSTimeInterval timeInterVal = [GiGaUserDefault getUserMaskeTime];
[self.cicleProgressView startWith:timeInterVal];
delegate.isMasking = YES;
[_startMaskMusic play];
//[_musicPalyer play];
// [self setBackGroundPlayingInfo];//锁屏音频信息
//底部弹窗
[self showWaringView];
//[self showWaringView];
//app 前台时收到本地通知showAlert 后台时通知提醒
// [[GiGaLocalNotificationManager localNotifiationCenter] sendLocalNotification:@"本地推送" fireTimeInterval:timeInterVal alertAction:@"测试面膜时间" withIdentifier:kLOCALNotifiID_MASKETIMEEND];
[[GiGaLocalNotificationManager localNotifiationCenter] sendLocalNotification:@"面膜时间结束" fireTimeInterval:timeInterVal alertAction:@"面膜时间提醒" withIdentifier:kLOCALNotifiID_MASKETIMEEND];
}
@@ -538,19 +579,30 @@
#pragma mark 面膜时间结束
-(void)maskTimeEnd{
self.openDanmuButton.hidden = YES;
[self sendEndMaskTime];
NC_POST_NAME_OBJECT(kUserNoti_MASKEND, nil);
//面膜时间结束时设置 全局变量 不再发送本地通知 提醒
AppDelegate *delegate =(AppDelegate *) [[UIApplication sharedApplication] delegate];
delegate.isMasking = NO;
[_musicPalyer stop];
//[_musicPalyer stop];
//震动 需用户手动开启震动模式
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
//复原动画
[self endMaskAnimation];
}
#pragma mark 开始测试
-(void)testBtnAcion:(UIButton *)btn{
// GIGaMaskShareViewController *shareVC = [[GIGaMaskShareViewController alloc] init];
// shareVC.maskTimeId = self.currentMaskId;
// [self.navigationController pushViewController:shareVC animated:YES];
// return;
// NSDictionary *dic = @{
// @"dryness":@"0.41",
// @"drynessPercent":@"41%",
@@ -566,9 +618,13 @@
// [self showAlertGoShareMaskTime];
[self startTest];
}
-(void)startTest{
GiGaQuestionVC *questionVC = [[GiGaQuestionVC alloc] init];
[self.navigationController pushViewController:questionVC animated:YES];
}
-(void)addNotify{
@@ -583,7 +639,21 @@
//用户关闭弹幕聊天
NC_ADD_TARGET_NAME_OBJECT(self, @selector(userCloseChatRoomAction), @"UserCloseChatRoomAction", nil);
//
NC_ADD_TARGET_NAME_OBJECT(self, @selector(flingcommitViewTestAreaAction), @"flingcommitViewTestAreaAction", nil);
//测试肤质flag 状态更新
NC_ADD_TARGET_NAME_OBJECT(self, @selector(testfalgUpdateAction), @"testfalgUpdate", nil);
}
//弹幕界面点击测试按钮区域
-(void)flingcommitViewTestAreaAction{
[self startTest];
}
//测试按钮状态更新通知
-(void)testfalgUpdateAction{
NSAttributedString *title = [GiGaHelper stringWithText:@"重新测试" textColor:[UIColor whiteColor] textFont:GIGA_TEXTFONTBOLD(18) leterSpace:0];
[_startTestButton setAttributedTitle:title forState:UIControlStateNormal];
}
@@ -597,6 +667,8 @@
#pragma mark 新手引导蒙版消失
-(void)guardViewDissmiss{
self.swipeGaurdimagView.hidden = NO;
self.startMaskButton.hidden = NO;
[self showWaringView];
}
@@ -620,11 +692,15 @@
NC_REMOVE_NAME(self, kUserLogOutNotify, nil);
NC_REMOVE_NAME(self, kUserLoginSuccessNoti, nil);
NC_REMOVE_NAME(self, @"UserCloseChatRoomAction", nil);
NC_REMOVE_NAME(self, @"flingcommitViewTestAreaAction",nil);
NC_REMOVE_NAME(self,@"testfalgUpdate",nil);
}
#pragma mark 新手引导
-(void)showUserGaurdView{
self.swipeGaurdimagView.hidden = YES;
self.startMaskButton.hidden = YES;
UserGuardViewController *userGuardVC = [[UserGuardViewController alloc] init];
if (ISIOS8) {
userGuardVC.modalPresentationStyle = UIModalPresentationOverCurrentContext;
@@ -680,7 +756,6 @@
}
}
}
self.navigationController.navigationBar.backgroundColor = [UIColor whiteColor];
}
@@ -688,8 +763,11 @@
-(void)refreshUserIcon:(NSString *)imageUrl{
NSURL *url = [NSURL URLWithString:imageUrl];
[self.rightNavUserBtn sd_setImageWithURL:url forState:UIControlStateNormal];
// [self.rightNavUserBtn sd_setImageWithURL:url forState:UIControlStateNormal];
[self.rightNavUserBtn sd_setImageWithURL:url forState:UIControlStateNormal placeholderImage:[UIImage imageNamed:@"nav_circle_avatar"] completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
}];
}
#pragma mark 消息 action
@@ -707,7 +785,6 @@
GiGaUserLoginVC *userlogInVC= [[GiGaUserLoginVC alloc] init];
GiGaBaseNavViewController *baseNav = [[GiGaBaseNavViewController alloc] initWithRootViewController:userlogInVC];
[self presentViewController:baseNav animated:YES completion:nil];
}
}
@@ -733,6 +810,7 @@
[UIView animateWithDuration:0.4 animations:^{
self.waringView.frame = CGRectMake(0,CGRectGetMaxY(self.view.frame) - 44 - PhoneX_BottomMargin, self.view.frame.size.width, 44);
}];
[self.waringView showView];
}
@@ -774,7 +852,6 @@
if (user.headImgUrl && ![user.headImgUrl isKindOfClass:[NSNull class]] ) {
[self refreshUserIcon:user.headImgUrl];
}
}
#pragma mark 去分享
@@ -799,7 +876,6 @@
[self.navigationController pushViewController:shareVC animated:YES];
}
}];
}
}
@@ -817,8 +893,10 @@
BOOL isUserLogin = [GiGaUserDefault isUserLogin];
if (isUserLogin) {
NSTimeInterval timeInterVal = [GiGaUserDefault getUserMaskeTime];
NSString *minute = [NSString stringWithFormat:@"%.f",timeInterVal /60];
NSString *minute = [NSString stringWithFormat:@"%.1f",timeInterVal / 60];
GiGaBaseAPiRequest *api = [GiGaBaseAPiRequest initWithRequestPath:KApiBeginMaskTime method:RequestPostMethod parms:@{@"minute":minute}];
[api requstDataWithResult:^(GiGaAPIResult *result) {
if (result.success) {
@@ -839,7 +917,6 @@
[api requstDataWithResult:^(GiGaAPIResult *result) {
if (result.success) {
GILog(@"%@",@"面膜时间APi结束");
}
}];
}
@@ -851,4 +928,5 @@
}
@end
@@ -8,8 +8,10 @@
#import "GiGaBaseViewController.h"
#import "GiGaShareModel.h"
#import "GiGaLoaclImageModel.h"
@interface ShareViewController : GiGaBaseViewController
@property(nonatomic,strong) GiGaShareModel *model;
@property(nonatomic,strong) GiGaLoaclImageModel *localModel;
@end
@@ -20,34 +20,35 @@
#import "UIImage+ShotImage.h"
#import "GiGaBaseAPiRequest.h"
#import "UIImageView+WebCache.h"
#import "GIGaSharePageViewController.h"
#import "LXCustomActionSheet.h"
@interface ShareViewController ()<UITableViewDelegate,UITableViewDataSource,UIImagePickerControllerDelegate,UINavigationControllerDelegate>
@property(nonatomic,strong) UITableView *tab;
@property(nonatomic,strong) UIImageView *backimageview ;
@property(nonatomic) int curentImageIndex ;
@property(nonatomic,strong) NSArray *descArr;
//
@property(nonatomic,strong)NSMutableArray *viewControllers;
@end
@implementation ShareViewController
- (void)viewDidLoad {
[super viewDidLoad];
_curentImageIndex = 5;
[self creatTabUI];
self.descArr = @[@"生活不易,必须美丽",@"长夜漫漫,不如面膜时间",@"敷片面膜,人间值得",@"打开面膜时间,撰写你与美丽的故事",@"人越美丽,责任越大",@"吃得苦中苦,方为人上人",@"该放弃的决不挽留,该留住的决不放手"];
UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
backBtn.frame = CGRectMake(20,20 +PhoneX_TopMargin, 40, 40);
backBtn.frame = CGRectMake(15,20 +PhoneX_TopMargin, 40, 40);
[backBtn setImage:[UIImage imageNamed:@"btn_moment_back"] forState:UIControlStateNormal];
[backBtn addTarget:self action:@selector(backBtnAction) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:backBtn];
[self creatBtns];
NC_ADD_TARGET_NAME_OBJECT(self, @selector(usershareSuccessNoti), NC_UseShareSuccessNoti, nil);
}
@@ -69,10 +70,15 @@
backimageview.contentMode = UIViewContentModeScaleAspectFill;
backimageview.frame = CGRectMake(0,0,self.view.frame.size.width, self.view.frame.size.height);
backimageview.userInteractionEnabled = YES;
backimageview.image = [GIGaUserFileHelper getUserShareImage:kUSERSHAREA_IMAGENAME];
self.backimageview = backimageview;
//默认背景 拍照 相册 或本地
if (self.localModel) {
backimageview.image = [UIImage imageNamed:self.localModel.localImageName];
}else{
backimageview.image = [GIGaUserFileHelper getUserShareImage:kUSERSHAREA_IMAGENAME];
}
self.backimageview = backimageview;
self.tab.backgroundView = backimageview;
}
@@ -91,8 +97,31 @@
cell = [[[NSBundle mainBundle] loadNibNamed:@"MaskTimeShareViewCell" owner:self options:nil] lastObject];
}
//默认
cell.descLabe.text = self.descArr[self.curentImageIndex];
if (self.localModel) {
//本地
cell.descLabe.text = self.localModel.desc;
if (self.localModel.descColorflag == 1) {
cell.descLabe.textColor = [UIColor whiteColor];
}else{
cell.descLabe.textColor = [UIColor blackColor];
}
if (self.localModel.doingColorflag == 1) {
cell.doinglabel.textColor = [UIColor whiteColor];
}else if (self.localModel.descColorflag == 3){
cell.doinglabel.textColor = GIGARGB(170, 170, 170, 1);
}else{
cell.doinglabel.textColor = [UIColor blackColor];
}
cell.shareLabe.image = [UIImage imageNamed:self.localModel.shareLabeimageName];
}else{
//默认
cell.descLabe.text = @"现在做些什么呢?";
}
return cell;
}else if (indexPath.row == 1){
@@ -112,13 +141,13 @@
}
}
return cell;
}
else if (indexPath.row == 2){
}else if (indexPath.row == 2){
MaskShareBoootomViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MaskShareBoootomViewCell"];
if (!cell) {
cell = [[[NSBundle mainBundle] loadNibNamed:@"MaskShareBoootomViewCell" owner:self options:nil] lastObject];
}
return cell;
}
@@ -167,8 +196,8 @@
[shareBtn addTarget:self action:@selector(shareBtnAction) forControlEvents:UIControlEventTouchUpInside];
shareBtn.layer.masksToBounds = YES;
shareBtn.layer.cornerRadius = 4;
[self.view addSubview:shareBtn];
[shareBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(120, 40));
make.bottom.mas_equalTo(self.view.mas_bottom).mas_offset(-45);
@@ -176,6 +205,13 @@
}];
if (self.localModel) {
changeBtn.hidden = YES;
[shareBtn mas_updateConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self.view.mas_centerX);
}];
}
}
//更换背景
@@ -193,32 +229,11 @@
case 1:
{
//系统
self.curentImageIndex ++;
if (self.curentImageIndex > 6) {
self.curentImageIndex = 0;
}
NSArray *images = @[@"sharebg_1",@"sharebg_2",@"sharebg_3",@"sharebg_4",@"sharebg_5",@"sharebg_6",@"sharebg_7"];
[self.backimageview setImage:[UIImage imageNamed: images[self->_curentImageIndex]]];
MaskTimeShareViewCell *cell = [self.tab cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]];
NSArray *shareimages = @[@"share_oneblack",@"share_one",@"share_one",@"share_one",@"share_one",@"share_one",@"share_one"];
NSArray*doingcolorS = @[[UIColor blackColor],GIGARGB(170, 170, 170, 1),[UIColor blackColor],[UIColor blackColor],[UIColor blackColor],[UIColor blackColor],[UIColor blackColor]];
cell.shareLabe.image = [UIImage imageNamed:shareimages[self.curentImageIndex]];
cell.doinglabel.textColor = doingcolorS[self.curentImageIndex];
NSArray *descArr = @[@"生活不易,必须美丽",@"长夜漫漫,不如面膜时间",@"敷片面膜,人间值得",@"打开面膜时间,撰写你与美丽的故事",@"人越美丽,责任越大",@"吃得苦中苦,方为人上人",@"该放弃的决不挽留,该留住的决不放手"];
NSArray *desColor = @[[UIColor whiteColor],[UIColor whiteColor],[UIColor blackColor],[UIColor whiteColor],[UIColor whiteColor],[UIColor whiteColor],[UIColor blackColor]];
cell.descLabe.text = descArr[self.curentImageIndex];
cell.descLabe.textColor = desColor[self.curentImageIndex];
GIGaSharePageViewController *share = [[GIGaSharePageViewController alloc] initWithControllers:self.viewControllers];
//share.model = self.model;
[self presentViewController:share animated:NO completion:nil];
}
break;
@@ -249,22 +264,15 @@
}else{
NSString *errorStr = @"应用相权册限受限,请在设置中启用";
NSString *errorStr = @"应用相受限,请在设置中启用";
[self jxt_showAlertWithTitle:@"" message:errorStr appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
alertMaker.addActionCancelTitle(@"取消");
alertMaker.addActionDefaultTitle(@"去开启");
alertMaker.addActionCancelTitle(@"知道了");
//alertMaker.addActionDefaultTitle(@"去开启");
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
if (buttonIndex == 1) {
NSURL *url = [NSURL URLWithString:@"prefs:root=Photos"];
if ([[UIApplication sharedApplication] canOpenURL:url]) {
[[UIApplication sharedApplication] openURL:url];
}
}
}];
}
}
//拍照
@@ -279,21 +287,12 @@
if(authStatus == AVAuthorizationStatusRestricted || authStatus == AVAuthorizationStatusDenied){
NSString *errorStr = @"应用相机权限受限,请在设置中启用";
[self jxt_showAlertWithTitle:@"" message:errorStr appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
alertMaker.addActionCancelTitle(@"取消");
alertMaker.addActionDefaultTitle(@"去开启");
alertMaker.addActionCancelTitle(@"知道了");
//alertMaker.addActionDefaultTitle(@"去开启");
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
if (buttonIndex == 1) {
NSString *urlStr = @"App-Prefs:root=Photos";
if (@available(iOS 10.0, *)) {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlStr] options:@{} completionHandler:nil];
} else {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlStr]];
// Fallback on earlier versions
}
}
}];
return;
}
@@ -328,25 +327,27 @@
GIGA_ShowToast(@"未安装微信");
return;
}
UIImage *image = [UIImage saveLongImage:self.tab];
[self jxt_showActionSheetWithTitle:@"分享到微信" message:@"" appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
alertMaker.addActionDefaultTitle(@"微信好友");
alertMaker.addActionDefaultTitle(@"朋友圈");
alertMaker.addActionCancelTitle(@"取消");
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
UIImage *image = [UIImage saveLongImage:self.tab];
LXCustomActionSheet *sheet = [[LXCustomActionSheet alloc] initWithTitle:@"分享到微信" optionsArr:@[@"微信好友",@"朋友圈"] cancelTitle:@"取消" selectedBlock:^(NSInteger index) {
if (buttonIndex==0) {
if (index==0) {
//好友
[self shareImagToWX:image scene:WXSceneSession];
}else if (buttonIndex==1){
// 朋友圈
}else if (index==1){
// 朋友圈
[self shareImagToWX:image scene:WXSceneTimeline];
}
} cancelBlock:^{
GILog(@"取消");
}];
[sheet show];
}
-(void)shareImagToWX:(UIImage *)image scene:(int)scene{
@@ -377,4 +378,33 @@
}
- (NSMutableArray *)viewControllers {
if (!_viewControllers) {
_viewControllers = [NSMutableArray array];
NSArray *descArr = @[@"生活不易,必须美丽",@"长夜漫漫,不如面膜时间",@"敷片面膜,人间值得",@"打开面膜时间,撰写你与美丽的故事",@"人越美丽,责任越大",@"吃得苦中苦,方为人上人",@"该放弃的决不挽留,该留住的决不放手"];
NSArray *images = @[@"sharebg_1",@"sharebg_2",@"sharebg_3",@"sharebg_4",@"sharebg_5",@"sharebg_6",@"sharebg_7"];
NSArray *shareimages = @[@"share_oneblack",@"share_one",@"share_one",@"share_one",@"share_one",@"share_one",@"share_one"];
NSArray *desColor = @[@1,@1,@2,@1,@1,@1,@2];
NSArray*doingcolorS = @[@2,@3,@2,@2,@2,@2,@2];
for (int i = 0; i <descArr.count; i++) {
ShareViewController *vc = [[ShareViewController alloc] init];
GiGaLoaclImageModel *model = [[GiGaLoaclImageModel alloc] init];
model.desc = descArr[i];
model.localImageName = images[i];
model.shareLabeimageName = shareimages[i];
model.doingColorflag = [doingcolorS[i] integerValue];
model.descColorflag = [desColor[i] integerValue];
vc.localModel = model;
[_viewControllers addObject:vc];
}
}
return _viewControllers;
}
@end
@@ -12,7 +12,9 @@
#import "SHineLabel.h"
@interface UserGuardViewController ()
@property(nonatomic,strong) UIImageView *handimage;
@property(nonatomic,strong) UIImageView *upimage;
@end
@@ -29,24 +31,39 @@
-(void)creatUI{
// UIButton *dismisBtn= [UIButton buttonWithType:UIButtonTypeCustom];
// //face
// UIImageView *faceimage = [[UIImageView alloc] init];
// faceimage.image = [UIImage imageNamed:@"bg_img_face"];
// faceimage.contentMode = UIViewContentModeScaleAspectFit;
// [self.view addSubview:faceimage];
// [faceimage mas_makeConstraints:^(MASConstraintMaker *make) {
//
// [dismisBtn setTitle:@"知道了" forState:UIControlStateNormal];
// [dismisBtn setTintColor:[UIColor whiteColor]];
// dismisBtn.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.1];
// [dismisBtn addTarget:self action:@selector(dismisBtnAction) forControlEvents:UIControlEventTouchUpInside];
// [self.view addSubview:dismisBtn];
//
// [dismisBtn mas_makeConstraints:^(MASConstraintMaker *make) {
// make.width.mas_equalTo(100);
// make.height.mas_equalTo(60);
// make.size.mas_equalTo(CGSizeMake(99, 124));
// make.centerX.mas_equalTo(self.view.mas_centerX);
// make.top.mas_equalTo(self.view.mas_top).offset(200);
// make.top.mas_equalTo(self.view.mas_top).offset(91);
//
// }];
//
// //mask
// UIImageView *maskimage = [[UIImageView alloc] init];
// maskimage.image = [UIImage imageNamed:@"mask_img_mask"];
// maskimage.contentMode = UIViewContentModeScaleAspectFit;
// [self.view addSubview:maskimage];
// [maskimage mas_makeConstraints:^(MASConstraintMaker *make) {
// make.size.mas_equalTo(CGSizeMake(72, 87));
// make.centerX.mas_equalTo(self.view.mas_centerX);
// make.top.mas_equalTo(self.view.mas_top).offset(254);
//
// }];
// UIView *holdbackView = [[UIView alloc] initWithFrame:self.view.bounds];
// holdbackView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.4];
// [self.view addSubview:holdbackView];
//usergaurd_uphand
UIImageView *upimage = [[UIImageView alloc] init];
upimage.image = [UIImage imageNamed:@"userguard_up"];
self.upimage = upimage;
[self.view addSubview:upimage];
[upimage mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.and.with.mas_equalTo(20);
@@ -85,6 +102,7 @@
}];
// [self creatnaima];
}
@@ -100,12 +118,22 @@
make.top.mas_equalTo(201);
}];
[self->_upimage mas_updateConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(201);
}];
[self.view layoutIfNeeded];
} completion:^(BOOL finished) {
[self->_handimage mas_updateConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(301);
}];
[self->_upimage mas_updateConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(298);
}];
[self.view layoutIfNeeded];
}];
@@ -237,12 +237,15 @@
if (index > _currentModel.answerList.count) {
return;
}
// 稿
NSLog(@"答案下标:%d",index);
//
//使
_currentModel.slidervalue = value;
// defaultFlag 1
[self changeAnswerDefaultflag:index];
}
@@ -330,8 +333,6 @@
-(void)reloadViews{
//
if (_page == self.questonArray.count) {
NSAttributedString *nextTitle = [[NSAttributedString alloc] initWithString:@"完成" attributes:@{NSFontAttributeName:[UIFont fontWithName:GIGA_FONTBOLD size:18],NSForegroundColorAttributeName:[UIColor whiteColor]}];
@@ -436,8 +437,7 @@
}];
}
}
//
@@ -458,6 +458,8 @@
NSUInteger minute = [mode.minute integerValue];
NSTimeInterval time = minute * 60;
[GiGaUserDefault savaMaskeTime:time];
[GiGaUserDefault saveUserTestFlag:YES];
NC_POST_NAME_OBJECT(@"testfalgUpdate", nil);
//
// NSDictionary *dic = @{
@@ -475,7 +477,10 @@
[self.navigationController pushViewController:resultVC animated:YES];
}else{
if (result.code == 401) {
//token失效
[GiGaBaseAPiRequest userTokenTimeOutGologinFromVC:self];
}
GIGA_ShowToast(result.message);
}
@@ -529,4 +534,5 @@
// Dispose of any resources that can be recreated.
}
@end
@@ -19,6 +19,9 @@
#import "MaskTestNODataViewCell.h"
#import "UIButton+WebCache.h"
#import "UIImageView+WebCache.h"
#import "GiGaUserInfoVC.h"
#import "LXCustomActionSheet.h"
@interface MaskTestResultVC ()
@property (nonatomic,strong) UIView *tabheader;
@@ -139,6 +142,7 @@
[self.navigationController popViewControllerAnimated:YES];
}
}
- (void)viewDidAppear:(BOOL)animated{
[super viewDidAppear:animated];
@@ -173,7 +177,7 @@
rightBtn.layer.masksToBounds = YES;
rightBtn.layer.cornerRadius = 20;
[rightBtn setImage:[UIImage imageNamed:@"nav_circle_avatar"] forState:UIControlStateNormal];
[rightBtn addTarget:self action:@selector(goUserInfoView) forControlEvents:UIControlEventTouchUpInside];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:rightBtn];
if ([[[UIDevice currentDevice] systemVersion] doubleValue] >= 11.0) {
@@ -196,6 +200,11 @@
}
}
-(void)goUserInfoView{
GiGaUserInfoVC *userVC= [[GiGaUserInfoVC alloc] init];
[self.navigationController pushViewController:userVC animated:YES];
}
-(void)requstLatestTestData{
[self.view makeToastActivity:CSToastPositionCenter];
@@ -278,8 +287,10 @@
if (self.model == nil) {
return 255;
}
if (KMainW < 375) {
return 201;
if (KMainW == 375) {
return (KMainH - SAFE_NAV_HEIGHT) / 3.00 - 10;
}else if (KMainW <= 375){
return 201;
}
CGFloat viewH = self.view.frame.size.height - SAFE_NAV_HEIGHT;
CGFloat cellH = viewH / 3;
@@ -306,26 +317,48 @@
[self showFinalShareView];
UIImage *image = [UIImage saveNavsuitImage:self.tableView];
//[[GiGaFileNanager shareInstance] saveImaeToAlBum:image];
[self jxt_showActionSheetWithTitle:@"分享到微信" message:@"" appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
// [self jxt_showActionSheetWithTitle:@"分享到微信" message:@"" appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
//
// alertMaker.addActionDefaultTitle(@"微信好友");
// alertMaker.addActionDefaultTitle(@"朋友圈");
// alertMaker.addActionCancelTitle(@"取消");
// } actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
// [self hidSomeViews];
// if (buttonIndex==0) {
// //
// [self shareImagToWX:image scene:WXSceneSession];
//
//
// }else if (buttonIndex==1){
// //
// [self shareImagToWX:image scene:WXSceneTimeline];
// }else{
// GILog(@"取消");
//
// }
// }];
LXCustomActionSheet *sheet = [[LXCustomActionSheet alloc] initWithTitle:@"分享到微信" optionsArr:@[@"微信好友",@"朋友圈"] cancelTitle:@"取消" selectedBlock:^(NSInteger index) {
alertMaker.addActionDefaultTitle(@"微信好友");
alertMaker.addActionDefaultTitle(@"朋友圈");
alertMaker.addActionCancelTitle(@"取消");
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
if (index==0) {
[self hidSomeViews];
//
[self shareImagToWX:image scene:WXSceneSession];
}else if (index==1){
[self hidSomeViews];
//
[self shareImagToWX:image scene:WXSceneTimeline];
}
} cancelBlock:^{
[self hidSomeViews];
if (buttonIndex==0) {
//
[self shareImagToWX:image scene:WXSceneSession];
}else if (buttonIndex==1){
//
[self shareImagToWX:image scene:WXSceneTimeline];
}else{
GILog(@"取消");
}
GILog(@"取消");
}];
[sheet show];
}
-(void)hidSomeViews{
MaskResultShareViewCell *cell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:2 inSection:0]];
@@ -342,8 +375,7 @@
cell.shareBtn.hidden = YES;
cell.lastLabe.text = @"长按扫描二维码,测试你的肤质";
self.tabheader.hidden = NO;
}
-(void)shareImagToWX:(UIImage *)image scene:(int)scene{
@@ -17,5 +17,7 @@
@property (nonatomic,assign) int answer_id;
//默认答案 1选中 0 非选中
@property (nonatomic,assign) int defaultFlag;
//答案h序号
@property (nonatomic,assign) int sortNum;
@end
@@ -9,7 +9,7 @@
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSInteger,GIGaQuestionSliderType)
{
GIGaQuestionSliderTypeGray = 0,//灰
GIGaQuestionSliderTypeGray = 0,//灰 //红
GIGaQuestionSliderTypeGradient ,//变色
GIGaQuestionSliderTypeIndicator //带指示器
};
@@ -57,13 +57,14 @@
}
-(void)creatGradient{
self.minimumTrackTintColor=[UIColor clearColor];
self.maximumTrackTintColor=[UIColor clearColor];
NSArray *colorArr = @[(id)[[UIColor colorWithHex:0xFFFFFF] CGColor],
(id)[[UIColor colorWithHex:0xFFF3E4] CGColor],
(id)[[UIColor colorWithHex:0xFBC37B] CGColor]];
NSArray *colorLocationArray = @[@0.0, @0.5, @1];
NSArray *colorLocationArray = @[@0.0, @0.5, @1.0];
CAGradientLayer * gradientLayer = [CAGradientLayer layer];
gradientLayer.frame = self.bounds;
gradientLayer.masksToBounds = YES;
@@ -76,18 +77,21 @@
[gradientLayer setStartPoint:CGPointMake(0, 0)];
[gradientLayer setEndPoint:CGPointMake(1, 0)];
[self.layer addSublayer:gradientLayer];
}
-(void)createUI{
self.minimumValue = 0.0;
self.maximumValue = 1.0;
self.minimumTrackTintColor = GIGARGB(216,216, 216, 1);
self.maximumTrackTintColor = GIGARGB(216,216, 216, 1);
// self.minimumTrackTintColor = GIGARGB(216,216, 216, 1);
// self.maximumTrackTintColor = GIGARGB(216,216, 216, 1);
self.minimumTrackTintColor = GIGAUIColorFromRGBA(0xEA4D4D);
self.maximumTrackTintColor = GIGAUIColorFromRGBA(0xEA4D4D);
}
-(CGRect)trackRectForBounds:(CGRect)bounds
{
bounds.origin.x = bounds.origin.x;
@@ -95,6 +99,7 @@
bounds.size.height = bounds.size.height;
bounds.size.width = bounds.size.width;
return bounds;
}
-(void)thumbimageView{
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.14"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
@@ -49,6 +49,7 @@
<connections>
<outlet property="answerTitle" destination="iR5-Lj-9dP" id="Jlc-ce-rWZ"/>
</connections>
<point key="canvasLocation" x="137.59999999999999" y="148.42578710644679"/>
</tableViewCell>
</objects>
</document>
@@ -80,13 +80,15 @@
-(void)creatPopSlider{
[self creatTab];
NYSliderPopover *slider = [[NYSliderPopover alloc] init];
slider.frame = CGRectMake(0,self.frame.size.height,self.frame.size.height, 13);
NYSliderPopover *slider = [[NYSliderPopover alloc] initWithFrame:CGRectMake(0,self.frame.size.height,self.frame.size.height, 14)];
// slider.frame = CGRectMake(0,self.frame.size.height,self.frame.size.height, 14);
[slider addTarget:self action:@selector(updateValue:) forControlEvents:UIControlEventValueChanged];
self.poSlider = slider;
self.poSlider = slider;
[self addSubview:slider];
//self.poSlider.value = self.currentModel.slidervalue;
self.poSlider.value = self.currentModel.slidervalue;
self.poSlider.transform = CGAffineTransformMakeRotation(- M_PI/2);
//NSLog(@"popslider%@",self.poSlider);
}
-(void)creatNormalStyle:(NSArray *)titles style:(GIGaQuestionSliderType)type{
@@ -96,12 +98,13 @@
-(void)creatSliderType:(GIGaQuestionSliderType)type{
GIGaQuestionSlider *slider = [[GIGaQuestionSlider alloc] initWithFrame:CGRectMake(0,self.frame.size.height,self.frame.size.height, 13) type:type];
GIGaQuestionSlider *slider = [[GIGaQuestionSlider alloc] initWithFrame:CGRectMake(0,self.frame.size.height,self.frame.size.height, 14) type:type];
[slider addTarget:self action:@selector(updateValue:) forControlEvents:UIControlEventValueChanged];
self.slider = slider;
[self.slider setValue:self.currentModel.slidervalue];
[self addSubview:slider];
self.slider.transform = CGAffineTransformMakeRotation(- M_PI/2);
}
-(void)layoutSubviews{
@@ -145,9 +148,9 @@
[self selectNOBtnState:self.noBtn];
}else{
[self selctYesBtnState:self.yesBtn];
}
}
#pragma mark 是
@@ -192,8 +195,40 @@
-(void)updateValue:(UISlider *)slider{
NSLog(@"value%f",slider.value);
// 2 3 5 slider
if (self.poSlider) {
//1
[self anlysisAnswerWithSlider:slider.value];
}else{
// 2 3 5 slider
// 0 100
//
NSInteger totalCount = _answerList.count;
CGFloat powSize = 100.f / (totalCount -1);
//
CGFloat currentValue = slider.value * 100.f;
//
int count = currentValue / powSize;
//slider对应的value
int index = 0 ;
index = (int)_answerList.count - 1 -count;
if (index < 0) {
index = 0;
}
NSLog(@"%d",index);
float value = 1.f/(totalCount -1) * count;
NSLog(@"%f",value);
[self anlysisAnswerWithSlider:value];
[self sliderAutoChoiceAnswerValue:value];
}
}
[self anlysisAnswerWithSlider:slider.value];
-(void)sliderAutoChoiceAnswerValue:(float)value{
[self.slider setValue:value];
}
#pragma mark 题目答案解析
@@ -228,7 +263,7 @@
// 1
int count = currentValue / powSize;
//
// slider值逆序对应(slider 0 )
int index = 0 ;
index = (int)_answerList.count - 1 -count;
if (index < 0) {
@@ -43,57 +43,7 @@
make.bottom.mas_equalTo(self.mas_bottom);
}];
UIImageView *jianyiImageView = [[UIImageView alloc] init];
jianyiImageView.contentMode = UIViewContentModeScaleAspectFit;
jianyiImageView.image = [UIImage imageNamed:@"share_tim"];
[self addSubview:jianyiImageView];
[jianyiImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.mas_left).offset(40);
make.top.mas_equalTo(self.mas_top).offset(36);
if (KMainW < 375) {
make.size.mas_equalTo(CGSizeMake(139, 30));
}else{
make.size.mas_equalTo(CGSizeMake(179, 30));
}
}];
//
UILabel *timeLabel = [[UILabel alloc] init];
timeLabel.textColor = [UIColor blackColor];
if (KMainW < 375) {
timeLabel.font = GIGA_TEXTFONTBOLD(24);
}else{
timeLabel.font = GIGA_TEXTFONTBOLD(35);
}
timeLabel.text = @"17";
self.timeLabel = timeLabel;
[self addSubview:timeLabel];
[timeLabel sizeToFit];
[timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.mas_left).offset(73);
make.top.mas_equalTo(jianyiImageView.mas_bottom).offset(20);
}];
//
UIImageView *minueImageview = [[UIImageView alloc] init];
minueImageview.image = [UIImage imageNamed:@"share_minute"];
minueImageview.contentMode = UIViewContentModeScaleAspectFit;
[self addSubview:minueImageview];
[minueImageview mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(timeLabel.mas_right);
if (KMainW < 375) {
//se 5s
make.size.mas_equalTo(CGSizeMake(48, 49));
}else{
make.size.mas_equalTo(CGSizeMake(72, 49));
}
make.centerY.mas_equalTo(timeLabel.mas_centerY);
}];
//
UIView *colorView = [[UIView alloc] init];
@@ -118,6 +68,73 @@
}];
UIImageView *jianyiImageView = [[UIImageView alloc] init];
jianyiImageView.contentMode = UIViewContentModeScaleAspectFit;
jianyiImageView.image = [UIImage imageNamed:@"share_tim"];
[self addSubview:jianyiImageView];
[jianyiImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(colorView.mas_left).offset((KMainW - 82)*0.424);
make.top.mas_equalTo(self.mas_top).offset(36);
if (KMainW < 375) {
make.size.mas_equalTo(CGSizeMake(139, 30));
}else{
make.size.mas_equalTo(CGSizeMake(179, 30));
}
}];
//
UIImageView *minueImageview = [[UIImageView alloc] init];
minueImageview.image = [UIImage imageNamed:@"share_minute"];
minueImageview.contentMode = UIViewContentModeScaleAspectFit;
[self addSubview:minueImageview];
[minueImageview mas_makeConstraints:^(MASConstraintMaker *make) {
//make.left.mas_equalTo(colorView.mas_left).offset(20);
if (KMainW == 375) {
//x
make.left.mas_equalTo(colorView.mas_left).offset(30);
make.size.mas_equalTo(CGSizeMake(54, 49));
}
else if (KMainW < 375){
make.left.mas_equalTo(colorView.mas_left).offset(18);
make.size.mas_equalTo(CGSizeMake(48, 49));
}else if (KMainW == 414){
make.left.mas_equalTo(colorView.mas_left).offset(28);
make.size.mas_equalTo(CGSizeMake(54, 49));
}
else{
make.left.mas_equalTo(colorView.mas_left).offset(28);
make.size.mas_equalTo(CGSizeMake(72, 49));
}
make.top.mas_equalTo(jianyiImageView.mas_bottom).offset(20);
}];
//
UILabel *timeLabel = [[UILabel alloc] init];
timeLabel.textColor = [UIColor blackColor];
if (KMainW == 375) {
timeLabel.font = GIGA_TEXTFONTBOLD(26);
}else if (KMainW == 414){
timeLabel.font = GIGA_TEXTFONTBOLD(30);
}
else if (KMainW < 375){
timeLabel.font = GIGA_TEXTFONTBOLD(24);
}
else{
timeLabel.font = GIGA_TEXTFONTBOLD(35);
}
timeLabel.text = @"17";
self.timeLabel = timeLabel;
[self addSubview:timeLabel];
[timeLabel sizeToFit];
[timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(minueImageview.mas_left).offset(0);
make.centerY.mas_equalTo(minueImageview.mas_centerY);
}];
[self bringSubviewToFront:jianyiImageView];
[self bringSubviewToFront:minueImageview];
[self bringSubviewToFront:timeLabel];
@@ -125,6 +142,7 @@
}
- (void)layoutSubviews{
[super layoutSubviews];
[self drawViewInView:self.colorView backColor:GIGA_MAIN_BGCOLOR];
}
@@ -125,7 +125,7 @@
[lastLabe mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(logo.mas_centerY);
make.centerX.mas_equalTo(self.mas_centerX);
make.left.mas_equalTo(logo.mas_right).offset(5);
}];
//3
@@ -23,8 +23,18 @@
{
self = [super init];
if (self) {
[self thumbimageView];
[self createUI];
}
return self;
}
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
[self thumbimageView];
[self createUI];
}
return self;
}
@@ -34,16 +44,15 @@
- (NYPopover *)popover
{
if (_popover == nil) {
if (_popover == nil){
//Default size, can be changed after
[self addTarget:self action:@selector(updatePopoverFrame) forControlEvents:UIControlEventValueChanged];
_popover = [[NYPopover alloc] initWithFrame:CGRectMake(self.frame.origin.x, self.frame.origin.y - 32, 40, 32)];
[self updatePopoverFrame];
_popover.alpha = 0;
[self.superview addSubview:_popover];
[self thumbimageView];
[self createUI];
// [self thumbimageView];
// [self createUI];
}
return _popover;
@@ -52,7 +61,8 @@
- (void)setValue:(float)value
{
[super setValue:value];
[self updatePopoverFrame];
//[self updatePopoverFrame];
}
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
@@ -157,8 +167,10 @@
self.minimumValue = 0.0;
self.maximumValue = 1.0;
self.minimumTrackTintColor = GIGARGB(216,216, 216, 1);
self.maximumTrackTintColor = GIGARGB(216,216, 216, 1);
// self.minimumTrackTintColor = GIGARGB(216,216, 216, 1);
// self.maximumTrackTintColor = GIGARGB(216,216, 216, 1);
self.minimumTrackTintColor = GIGAUIColorFromRGBA(0xEA4D4D);
self.maximumTrackTintColor = GIGAUIColorFromRGBA(0xEA4D4D);
}
@@ -171,6 +183,8 @@
return bounds;
}
-(void)thumbimageView{
[self setThumbImage:[self OriginImage:[UIImage imageNamed:@"btn_slider_thumb"] scaleToSize:CGSizeMake(40, 40)] forState:UIControlStateNormal];
@@ -236,7 +250,6 @@
if ((point.x >= _lastBounds.origin.x - thumbBound_x) && (point.x <= (_lastBounds.origin.x + _lastBounds.size.width + thumbBound_x)) && (point.y < (_lastBounds.size.height + thumbBound_y))) {
result = YES;
}
}
return result;
}
@@ -0,0 +1,31 @@
//
// GiGaLoaclImageModel.h
// GIGA
//
// Created by lianxiang on 2018/10/12.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface GiGaLoaclImageModel : NSObject
//背景图片(本地)
@property(nonatomic,copy) NSString *localImageName;
//图片序号
@property(nonatomic) NSUInteger index;
//分享面膜时间 staring now 图片名 很白两种
@property(nonatomic,copy) NSString *shareLabeimageName;
//描述文本颜色 1 白 2 黑 3 GIGARGB(170, 170, 170, 1)
@property(nonatomic) NSUInteger descColorflag;
//描述文本
@property(nonatomic,copy) NSString *desc;
//文本颜色 what are we doing 颜色 黑白
@property(nonatomic) NSUInteger doingColorflag;
@end
@@ -0,0 +1,13 @@
//
// GiGaLoaclImageModel.m
// GIGA
//
// Created by lianxiang on 2018/10/12.
// Copyright © 2018 com.giga.ios. All rights reserved.
//
#import "GiGaLoaclImageModel.h"
@implementation GiGaLoaclImageModel
@end
+22
View File
@@ -0,0 +1,22 @@
//
// GiGaPageControl.h
// GIGA
//
// Created by lianxiang on 2018/10/8.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface GiGaPageControl : UIPageControl
{
UIImage *_defalutImage;
UIImage *_currentImage;
}
@end
NS_ASSUME_NONNULL_END
+50
View File
@@ -0,0 +1,50 @@
//
// GiGaPageControl.m
// GIGA
//
// Created by lianxiang on 2018/10/8.
// Copyright © 2018 com.giga.ios. All rights reserved.
//
#import "GiGaPageControl.h"
@implementation GiGaPageControl
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
_defalutImage = [UIImage imageNamed:@"pagecontrol_def"];
_currentImage = [UIImage imageNamed:@"pagecontrol_current"];
}
return self;
}
-(void)updateDots{
for (int i =0; i<self.subviews.count; i++) {
UIView *dot = [self.subviews objectAtIndex:i];
dot.backgroundColor = [UIColor clearColor];
UIImageView *imageview = [[UIImageView alloc] init];
if (i == self.currentPage) {
imageview.image = _currentImage;
imageview.frame = CGRectMake(0, 0, 26, 8);
}else{
imageview.image = _defalutImage;
imageview.frame = CGRectMake(0,0,8, 8);
}
for (UIView *subViews in dot.subviews) {
[subViews removeFromSuperview];
}
[dot addSubview:imageview];
}
}
-(void)setCurrentPage:(NSInteger)currentPage
{
[super setCurrentPage:currentPage];
[self updateDots];
}
@end
+22
View File
@@ -0,0 +1,22 @@
//
// LXPageControl.h
// GIGA
//
// Created by lianxiang on 2018/10/8.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface LXPageControl : UIView
@property (nonatomic, assign) NSInteger numberOfPages;
@property (nonatomic, assign) NSInteger currentPage;
@property (nonatomic, strong) UIColor *tintColor;
@property (nonatomic, strong) UIColor *currentTintColor;
@end
NS_ASSUME_NONNULL_END
+194
View File
@@ -0,0 +1,194 @@
//
// LXPageControl.m
// GIGA
//
// Created by lianxiang on 2018/10/8.
// Copyright © 2018 com.giga.ios. All rights reserved.
//
#import "LXPageControl.h"
#define pointWidth 5
#define pointInterval 8
@interface LXPageControl ()
@property (nonatomic, strong) NSMutableArray *pageArray;
@end
@implementation LXPageControl
{
BOOL _shouldSetColor;
BOOL _isInit;
BOOL _inAni; //
}
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self)
{
_tintColor = [UIColor lightGrayColor];
_currentTintColor = [UIColor whiteColor];
_shouldSetColor = NO;
_isInit = YES;
_inAni = NO;
if (!self.currentPage) {
self.currentPage = 0;
}
}
return self;
}
- (void)layoutSubviews
{
[super layoutSubviews];
if (self.pageArray.count == 0) return;
if (_shouldSetColor)
{
for (int i = 0; i < self.pageArray.count; i++)
{
UIView *view = self.pageArray[i];
view.backgroundColor = self.tintColor;
if (i == _currentPage)
{
view.backgroundColor = self.currentTintColor;
}
_shouldSetColor = NO;
}
}
if (_isInit)
{
CGFloat totalWidth = _numberOfPages * pointWidth + (_numberOfPages - 1) * pointInterval;
for (int i = 0; i < self.pageArray.count; i++)
{
UIView *view = self.pageArray[i];
CGFloat x = (self.frame.size.width - totalWidth) * 0.5f + (pointWidth + pointInterval) * i;
CGFloat y = (self.frame.size.height - pointWidth) * 0.5f;
CGFloat width = (i==_currentPage?(pointWidth + pointInterval):pointWidth);
CGFloat height = pointWidth;
if (i == _currentPage)
{
x = x - pointInterval * 0.5f;
}
view.frame = CGRectMake(x, y, width, height);
_isInit = NO;
}
}
}
#pragma mark -- setter
- (void)setNumberOfPages:(NSInteger)numberOfPages
{
_numberOfPages = numberOfPages;
if (self.pageArray.count > 0)
{
[self.pageArray enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop)
{
[(UIView *)obj removeFromSuperview];
}];
[self.pageArray removeAllObjects];
}
for (int i = 0; i < numberOfPages; i++)
{
UIView *indicatorView = [[UIView alloc] initWithFrame:CGRectZero];
indicatorView.layer.cornerRadius = pointWidth * 0.5f;
[self addSubview:indicatorView];
[self.pageArray addObject:indicatorView];
}
_shouldSetColor = YES;
[self setNeedsLayout];
}
- (void)setCurrentPage:(NSInteger)currentPage
{
if (self.pageArray.count == 0)
{
_currentPage = currentPage;
return;
}
if (_currentPage == currentPage) return;
if (_inAni) return;
//
if (currentPage > _currentPage)
{
UIView *currentView = self.pageArray[_currentPage];
UIView *nextView = self.pageArray[currentPage];
[self bringSubviewToFront:currentView];
_inAni = YES;
[UIView animateWithDuration:0.3 animations:^{
CGRect newFrame = currentView.frame;
newFrame.size = CGSizeMake((pointInterval + pointWidth) * (currentPage - self->_currentPage + 1), newFrame.size.height);
currentView.frame = newFrame;
} completion:^(BOOL finished)
{
[self bringSubviewToFront:nextView];
currentView.backgroundColor = self.tintColor;
nextView.backgroundColor = self.currentTintColor;
CGRect cFrame = currentView.frame;
nextView.frame = cFrame;
cFrame.origin = CGPointMake(cFrame.origin.x + pointInterval * 0.5f, cFrame.origin.y);
cFrame.size = CGSizeMake(pointWidth, pointWidth);
currentView.frame = cFrame;
[UIView animateWithDuration:0.3 animations:^{
CGRect newFrame = nextView.frame;
newFrame.size = CGSizeMake(pointInterval + pointWidth, newFrame.size.height);
newFrame.origin = CGPointMake(newFrame.origin.x + (pointInterval + pointWidth) * (currentPage - self->_currentPage), newFrame.origin.y);
nextView.frame = newFrame;
} completion:^(BOOL finished)
{
self->_currentPage = currentPage;
self->_inAni = NO;
}];
}];
}
//
else
{
UIView *currentView = self.pageArray[_currentPage];
UIView *nextView = self.pageArray[currentPage];
[self bringSubviewToFront:currentView];
_inAni = YES;
[UIView animateWithDuration:0.3 animations:^{
CGRect newFrame = currentView.frame;
newFrame.size = CGSizeMake((pointInterval + pointWidth) * (self->_currentPage - currentPage + 1), newFrame.size.height);
newFrame.origin = CGPointMake(newFrame.origin.x - (pointInterval + pointWidth) * (self->_currentPage - currentPage), newFrame.origin.y);
currentView.frame = newFrame;
} completion:^(BOOL finished)
{
[self bringSubviewToFront:nextView];
currentView.backgroundColor = self.tintColor;
nextView.backgroundColor = self.currentTintColor;
CGRect cFrame = currentView.frame;
nextView.frame = cFrame;
cFrame.origin = CGPointMake(cFrame.origin.x + pointInterval * 0.5f + (pointInterval + pointWidth) * (self->_currentPage - currentPage), cFrame.origin.y);
cFrame.size = CGSizeMake(pointWidth, pointWidth);
currentView.frame = cFrame;
[UIView animateWithDuration:0.3 animations:^{
CGRect newFrame = nextView.frame;
newFrame.size = CGSizeMake(pointInterval + pointWidth, newFrame.size.height);
nextView.frame = newFrame;
} completion:^(BOOL finished)
{
self->_currentPage = currentPage;
self->_inAni = NO;
}];
}];
}
}
- (NSMutableArray *)pageArray
{
if (!_pageArray)
{
_pageArray = [NSMutableArray array];
}
return _pageArray;
}
@end
@@ -9,6 +9,8 @@
#import "MaskTimeCircularProgressView.h"
#import "LXCountTimer.h"
#import "SHineLabel.h"
#import "GIGaDateHelper.h"
#import "AppDelegate.h"
@interface MaskTimeCircularProgressView()
@property (nonatomic) CADisplayLink *displayLink;
@@ -18,7 +20,7 @@
@property (nonatomic) NSTimeInterval currentTimeinterval;
@property (nonatomic,strong) LXCountTimer *timer;
@property (nonatomic,strong) NSTimer *playTimer;
@property (nonatomic,strong) UIImageView *holderImageView;
@end
@@ -48,6 +50,11 @@
-(void)setUP{
self.backgroundColor = [UIColor clearColor];
self.holderImageView.frame = CGRectMake(self.frame.size.width/2 -self.frame.size.width/4 , self.frame.size.width/2 -self.frame.size.width/4,self.frame.size.width/2, self.frame.size.width/2);
self.holderImageView.contentMode = UIViewContentModeScaleAspectFit;
[self addSubview:self.holderImageView];
_currentTimeinterval = 0;
_isMoving = NO;
self.countLabel.frame = CGRectMake(_lineWidth, self.frame.size.height /2 - 15 , self.frame.size.width - _lineWidth*2, 30);
@@ -90,7 +97,14 @@
}
return _countLabel;
}
//
- (UIImageView *)holderImageView{
if (!_holderImageView) {
_holderImageView = [[UIImageView alloc] init];
_holderImageView.image = [UIImage imageNamed:@"bg_on"];
}
return _holderImageView;
}
- (void)setLineWidth:(CGFloat)lineWidth{
CAShapeLayer *backgroundLayer = [self createRingLayerWithCenter:CGPointMake(CGRectGetWidth(self.frame) / 2, CGRectGetHeight(self.frame) / 2) radius:CGRectGetWidth(self.bounds) / 2 - lineWidth / 2 lineWidth:lineWidth color:self.backColor];
@@ -132,8 +146,8 @@
slice.lineCap = kCALineJoinRound;
slice.lineJoin = kCALineJoinBevel;
slice.path = smoothedPath.CGPath;
return slice;
}
- (void)setProgress:(float)progress{
@@ -167,7 +181,10 @@
- (void)startWith:(NSTimeInterval)time{
self.timeinterval = time;
[self countDown:time];
//
[self start];
}
@@ -187,13 +204,37 @@
-(void)countDown:(NSTimeInterval)timeInterVal{
NSString *timeformat = [GiGaHelper stringWithNSTimerinterval:timeInterVal];
NSArray *timesArr = [timeformat componentsSeparatedByString:@":"];
NSString *hour = timesArr[0];
NSString *min = timesArr[1];
NSString *sec = timesArr[2];
[self countTimeBegain:hour.integerValue minute:min.integerValue second:sec.integerValue];
AppDelegate *delegate =(AppDelegate *) [[UIApplication sharedApplication] delegate];
if (delegate.isMasking) {
}else{
[GIGaDateHelper saveSatrtDate];
}
NSDate *startDate = [GIGaDateHelper getStartDate];
NSDate* dat = [NSDate dateWithTimeIntervalSinceNow:0];
if (startDate == nil) {
startDate = dat;
}
NSTimeInterval passt = [GIGaDateHelper getTimebySubtracting:startDate andDate2:dat];
NSLog(@"passT %0.f",passt);
NSTimeInterval cunrenShowTimCount = timeInterVal > passt ? timeInterVal - passt: timeInterVal;
delegate.isMasking= YES;
weakify(self);
[self.timer countDownWithtimerInterval:cunrenShowTimCount completeBlock:^(NSInteger day, NSInteger hour, NSInteger minute, NSInteger second) {
[weakSelf refreshTimeCount:hour minute:minute second:second];
if (minute==0 && second == 0) {
delegate.isMasking = NO;
[GIGaDateHelper removeStartDate];
[GIGaDateHelper saveisMaskingflag:NO];
}
}];
}
#pragma mark 开始计时
@@ -205,8 +246,11 @@
[self.timer countDownWithStratTimeStamp:nowTimestamp finishTimeStamp:futrueTimestamp completeBlock:^(NSInteger day, NSInteger hour, NSInteger minute, NSInteger second) {
[weakSelf refreshTimeCount:hour minute:minute second:second];
}];
}
-(void)refreshTimeCount:(NSInteger)hour minute:(NSInteger)minute second:(NSInteger)second{
self.countLabel.text = [NSString stringWithFormat:@"%02ld:%02ld",minute,second];
@@ -25,7 +25,7 @@
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="OSF-Gb-h1M">
<rect key="frame" x="6" y="12" width="329" height="217"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bg_logo" translatesAutoresizingMaskIntoConstraints="NO" id="iJy-9p-48y">
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="img_product" translatesAutoresizingMaskIntoConstraints="NO" id="iJy-9p-48y">
<rect key="frame" x="8" y="8" width="313" height="175"/>
<constraints>
<constraint firstAttribute="height" constant="175" id="0Jj-uy-CDT"/>
@@ -107,7 +107,7 @@
</tableViewCell>
</objects>
<resources>
<image name="bg_logo" width="88" height="88"/>
<image name="img_product" width="164" height="121"/>
<image name="masktie_clock" width="20" height="19"/>
</resources>
</document>
@@ -88,7 +88,17 @@ typedef NS_ENUM(NSUInteger, GYTitlePosition) {
weakSelf.textLabel.layer.position = weakSelf.bottomPosition;
weakSelf.needDealy = DEALY_WHEN_TITLE_IN_BOTTOM;
weakSelf.currentIndex ++;
weakSelf.textLabel.text = [weakSelf.contentsAry objectAtIndex:[weakSelf realCurrentIndex]];
NSString *tex = [weakSelf.contentsAry objectAtIndex:[weakSelf realCurrentIndex]];
if ([tex isEqualToString:@"面膜时间"]) {
weakSelf.textLabel.font = GIGA_TEXTFONTMEDIUM(18);
}else{
if (KMainW < 375) {
weakSelf.textLabel.font = GIGA_TEXTFONTMEDIUM(10);
}else{
weakSelf.textLabel.font = GIGA_TEXTFONTMEDIUM(12);
}
}
weakSelf.textLabel.text = tex;
} else {
weakSelf.needDealy = DEALY_WHEN_TITLE_IN_MIDDLE;
}
@@ -96,7 +106,17 @@ typedef NS_ENUM(NSUInteger, GYTitlePosition) {
[weakSelf startAnimation];
} else { //label位置和label显示内容
weakSelf.textLabel.layer.position = weakSelf.middlePosition;
weakSelf.textLabel.text = [weakSelf.contentsAry objectAtIndex:[weakSelf realCurrentIndex]];
NSString *tex = [weakSelf.contentsAry objectAtIndex:[weakSelf realCurrentIndex]];
if ([tex isEqualToString:@"面膜时间"]) {
weakSelf.textLabel.font = GIGA_TEXTFONTMEDIUM(18);
}else{
if (KMainW < 375) {
weakSelf.textLabel.font = GIGA_TEXTFONTMEDIUM(10);
}else{
weakSelf.textLabel.font = GIGA_TEXTFONTMEDIUM(12);
}
}
weakSelf.textLabel.text = tex;
}
}];
}
@@ -357,7 +357,7 @@
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
if (buttonIndex == 0) {
[self satartCamera];
[self digPhotoAuth];
}else if (buttonIndex == 1){
[self fromAlbums];
}
@@ -390,6 +390,7 @@
-(void)satartCamera{
GIGaFeedPhontosViewCell *cell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:3]];
if ((cell.images.count + 1) > 6) {
GIGA_ShowToast(@"最多六张");
@@ -406,21 +407,12 @@
if(authStatus == AVAuthorizationStatusRestricted || authStatus == AVAuthorizationStatusDenied){
NSString *errorStr = @"应用相机权限受限,请在设置中启用";
[self jxt_showAlertWithTitle:@"" message:errorStr appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
alertMaker.addActionCancelTitle(@"取消");
alertMaker.addActionDefaultTitle(@"去开启");
alertMaker.addActionCancelTitle(@"知道了");
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
if (buttonIndex == 1) {
NSString *urlStr = @"App-Prefs:root=Photos";
if (@available(iOS 10.0, *)) {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlStr] options:@{} completionHandler:nil];
} else {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlStr]];
// Fallback on earlier versions
}
}
}];
return;
}
@@ -432,6 +424,47 @@
}
-(void)digPhotoAuth{
[PHPhotoLibrary requestAuthorization:^(PHAuthorizationStatus status){
switch (status) {
case PHAuthorizationStatusNotDetermined:
{
NSLog(@"用户还没有做出选择");
break;
}
case PHAuthorizationStatusAuthorized:
{
NSLog(@"用户允许当前应用访问相册");
// app需保存到相册
[self satartCamera];
break;
}
case PHAuthorizationStatusDenied:
{
//NSLog(@"用户拒绝当前应用访问相册,我们需要提醒用户打开访问开关");
GIGA_ShowToast(@"拒绝当前应用访问相册,请在系统设置中允许访问");
break;
}
case PHAuthorizationStatusRestricted:
{
NSLog(@"家长控制,不允许访问");
break;
}
default:
{
NSLog(@"default");
break;
}
}
}];
}
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker{
[picker dismissViewControllerAnimated:YES completion:nil];
@@ -439,6 +472,7 @@
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary<UIImagePickerControllerInfoKey,id> *)info
{
[picker dismissViewControllerAnimated:YES completion:nil];
GIGaFeedPhontosViewCell *cell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:3]];
+3 -6
View File
@@ -81,7 +81,7 @@
if (section == 0){
return 1;
}
return 3;
return 2;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
@@ -117,15 +117,11 @@
[self.navigationController pushViewController:userVC animated:YES];
}else{
if (indexPath.section == 1 && indexPath.row == 0 ){
GiGaUserViewController *userVC= [[GiGaUserViewController alloc] init];
[self.navigationController pushViewController:userVC animated:YES];
}else if (indexPath.section == 1 && indexPath.row == 1){
GIGaChangePassVC *changePass = [[GIGaChangePassVC alloc] init];
[self.navigationController pushViewController:changePass animated:YES];
}else{
GiGaChangePhoneNumberVC *changePass = [[GiGaChangePhoneNumberVC alloc] init];
@@ -133,6 +129,7 @@
}
}
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
@@ -308,8 +308,7 @@
if (!self.user.nickName || [self.user.nickName isKindOfClass:[NSNull class]]) {
self.user.nickName = @"";
}
if ( self.user.nickName.length >40 ) {
GIGA_ShowToast(@"用户名1-40字符长度")
return;
@@ -353,12 +352,11 @@
[api requstDataWithResult:^(GiGaAPIResult *result) {
[self.view hideToastActivity];
if (result.success) {
GIGA_ShowToast(@"修改成功");
GIGA_WIndowTost(@"修改成功")
[[GiGaUserManager shareUser] saveUser:self.user];
NC_POST_NAME_OBJECT(kUserNameUpDateNoti, nil);
[self.navigationController popViewControllerAnimated:YES];
}else{
GIGA_ShowToast(result.dic[@"msg"]);
if (result.code == 401) {
@@ -411,21 +409,12 @@
if(authStatus == AVAuthorizationStatusRestricted || authStatus == AVAuthorizationStatusDenied){
NSString *errorStr = @"应用相机权限受限,请在设置中启用";
[self jxt_showAlertWithTitle:@"" message:errorStr appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
alertMaker.addActionCancelTitle(@"取消");
alertMaker.addActionDefaultTitle(@"去开启");
alertMaker.addActionCancelTitle(@"知道了");
//alertMaker.addActionDefaultTitle(@"去开启");
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
if (buttonIndex == 1) {
NSString *urlStr = @"App-Prefs:root=Photos";
if (@available(iOS 10.0, *)) {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlStr] options:@{} completionHandler:nil];
} else {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlStr]];
// Fallback on earlier versions
}
}
}];
return;
}
@@ -450,19 +439,13 @@
}else{
NSString *errorStr = @"应用相册限受限,请在设置中启用";
NSString *errorStr = @"应用相册限受限,请在设置中启用";
[self jxt_showAlertWithTitle:@"" message:errorStr appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
alertMaker.addActionCancelTitle(@"取消");
alertMaker.addActionDefaultTitle(@"去开启");
alertMaker.addActionCancelTitle(@"知道了");
//alertMaker.addActionDefaultTitle(@"去开启");
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
if (buttonIndex == 1) {
NSURL *url = [NSURL URLWithString:@"prefs:root=Photos"];
if ([[UIApplication sharedApplication] canOpenURL:url]) {
[[UIApplication sharedApplication] openURL:url];
}
}
}];
}
@@ -18,8 +18,8 @@
@interface GiMaskTimeHistoryVC ()<UITableViewDelegate,UITableViewDataSource>
@property(nonatomic,strong) NSMutableArray *dataArr;
@property(nonatomic) NSUInteger currentPage;
@property(nonatomic,assign) NSInteger totalMinute;
@property(nonatomic) int currentPage;
@property(nonatomic,copy) NSString *totalMinute;
@property(nonatomic,assign) NSInteger ranking;
@property(nonatomic,assign) NSUInteger totalPage;
//@property(nonatomic,strong) MaskHistryRecordlist *record;
@@ -35,7 +35,7 @@
[super viewDidLoad];
self.dataArr = [[NSMutableArray alloc] init];
_currentPage = 1;
_totalMinute = 0;
_totalMinute = @"0.0";
_ranking = 0;
_isFreshing = NO;
[self addNavTitile:@"历史记录"];
@@ -53,7 +53,7 @@
self.tableView.rowHeight = UITableViewAutomaticDimension;
[self creatRefreshView];
[self loadDataWtih:[NSString stringWithFormat:@"%ld",_currentPage] isFresh:YES];
[self loadDataWtih:[NSString stringWithFormat:@"%d",_currentPage] isFresh:YES];
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
@@ -84,7 +84,7 @@
}
cell.timeLabe.text = [NSString stringWithFormat:@"%ld",(long)self.totalMinute];
cell.timeLabe.text = [NSString stringWithFormat:@"%@",self.totalMinute];
if (self.exquisitePercent) {
NSString *text = [NSString stringWithFormat:@"本月超过%@用户",self.exquisitePercent];
@@ -111,7 +111,6 @@
return cell;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
if (section == 0) {
return 1;
@@ -154,7 +153,7 @@
NSDictionary *reDic =result.dic;
self.ranking = [[reDic valueForKey:@"ranking"] integerValue];
self.totalMinute = [[reDic valueForKey:@"totalMinute"] integerValue] ;
self.totalMinute = [reDic valueForKey:@"totalMinute"];
self.exquisitePercent = [reDic valueForKey:@"exquisitePercent"];
self.guizeUrl = [reDic valueForKey:@"ruleUrl"];
@@ -220,10 +219,9 @@
return;
}
if (_currentPage < _totalPage) {
_currentPage ++;
[self loadDataWtih:[NSString stringWithFormat:@"%ld",self.currentPage] isFresh:NO];
[self loadDataWtih:[NSString stringWithFormat:@"%d",self.currentPage] isFresh:NO];
}
}
+1
View File
@@ -32,5 +32,6 @@
@property(nonatomic,copy) NSString *sexName;
@property(nonatomic,copy) NSString *weixin;
@property(nonatomic) float minute;
@end
@@ -25,12 +25,15 @@
- (void)textViewDidChange:(UITextView *)textView
{
if (textView == self.contentFiled) {
if (textView.text.length == 0) {
self.holdLabe.hidden = NO;
}
if ( textView.text.length <=100 ) {
self.holdLabe.hidden = YES;
if ( textView.text.length <=100) {
if (textView.text.length == 0) {
self.holdLabe.hidden = NO;
}else{
self.holdLabe.hidden = YES;
}
self.numberCountLabe.text = [NSString stringWithFormat:@"%lu/100",(unsigned long)textView.text.length];
self.contentFiled.text = textView.text;
self.textMAx = textView.text;
-4
View File
@@ -21,10 +21,6 @@
self.infoTitle.text = @"个人信息";
self.numberLabe.hidden = YES;
}else if (indexPath.section == 1 && indexPath.row == 1){
//
self.infoTitle.text = @"修改密码";
self.numberLabe.hidden = YES;
}else if (indexPath.section == 1 && indexPath.row == 2){
//
self.infoTitle.text = @"修改手机";
self.numberLabe.hidden = NO;
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.14"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
@@ -32,10 +32,10 @@
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Kst-pD-CHd">
<rect key="frame" x="25" y="43.5" width="324.5" height="0.5"/>
<rect key="frame" x="25" y="43" width="324.5" height="0.5"/>
<color key="backgroundColor" red="0.87058823529999996" green="0.87058823529999996" blue="0.87058823529999996" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="0.5" id="Uus-Ns-JTy"/>
<constraint firstAttribute="height" constant="0.5" id="ESZ-rm-dCn"/>
</constraints>
</view>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="user_indicator_right" translatesAutoresizingMaskIntoConstraints="NO" id="bdq-X4-7Cg">
@@ -47,14 +47,14 @@
</imageView>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="Kst-pD-CHd" secondAttribute="trailing" constant="25.5" id="C8S-X7-7Rz"/>
<constraint firstItem="y6H-zg-4yv" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="120" id="DIy-Iq-K1L"/>
<constraint firstAttribute="trailing" secondItem="bdq-X4-7Cg" secondAttribute="trailing" constant="17" id="Fbe-Qg-IBx"/>
<constraint firstItem="Kst-pD-CHd" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="25" id="MHr-ud-Hb1"/>
<constraint firstAttribute="trailing" secondItem="Kst-pD-CHd" secondAttribute="trailing" constant="25.5" id="IIY-Ji-Vmi"/>
<constraint firstItem="Kst-pD-CHd" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="25" id="L6U-8j-1kg"/>
<constraint firstItem="bdq-X4-7Cg" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" constant="0.25" id="a00-Gq-hFr"/>
<constraint firstAttribute="bottom" secondItem="Kst-pD-CHd" secondAttribute="bottom" constant="-0.5" id="eZ9-17-ap9"/>
<constraint firstItem="OA0-rJ-5qY" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="i9g-Lz-1cw"/>
<constraint firstItem="OA0-rJ-5qY" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="29" id="mRd-S1-39D"/>
<constraint firstAttribute="bottom" secondItem="Kst-pD-CHd" secondAttribute="bottom" id="skw-un-GQY"/>
<constraint firstItem="y6H-zg-4yv" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="uJ4-iv-cmb"/>
</constraints>
</tableViewCellContentView>

Some files were not shown because too many files have changed in this diff Show More