login 适配 se 5s 新增icon 主页修改

This commit is contained in:
lianxiang 2018-09-04 21:54:04 +08:00
parent 3a3e6eeee9
commit 17d4481f2c
66 changed files with 1136 additions and 306 deletions

View File

@ -19,6 +19,12 @@
83346AD4212BFF6E0054D597 /* UserGuardViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83346AD3212BFF6E0054D597 /* UserGuardViewController.m */; };
83346AD7212C18F50054D597 /* GiGaAppGaurdVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 83346AD6212C18F50054D597 /* GiGaAppGaurdVC.m */; };
833DA7762122A62000A5C614 /* GiGaMaskTaskViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 833DA7752122A62000A5C614 /* GiGaMaskTaskViewController.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 */; };
8340BFA9213E65CA008F22E4 /* GIGACommonLocalizabe.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8340BFA8213E65CA008F22E4 /* GIGACommonLocalizabe.strings */; };
8340BFAB213E665D008F22E4 /* GIGAUserLocalizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8340BFAA213E665D008F22E4 /* GIGAUserLocalizable.strings */; };
8340BFAF213E739D008F22E4 /* GiGaNoNetWorkView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8340BFAE213E739D008F22E4 /* GiGaNoNetWorkView.m */; };
8342D9FD2131150200D16B1D /* 4481.wav in Resources */ = {isa = PBXBuildFile; fileRef = 8342D9FC2131150200D16B1D /* 4481.wav */; };
8349585C212511040064DB6C /* AppDelegate+ThirdParty.m in Sources */ = {isa = PBXBuildFile; fileRef = 8349585B212511040064DB6C /* AppDelegate+ThirdParty.m */; };
835060A2212D1225007E6220 /* GiGaMeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 835060A1212D1225007E6220 /* GiGaMeViewController.m */; };
@ -102,6 +108,7 @@
83BFAE73213CDB58004EF801 /* GiSysSettingsVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 83BFAE72213CDB58004EF801 /* GiSysSettingsVC.m */; };
83BFAE77213CDE91004EF801 /* GiGaSettingsViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 83BFAE75213CDE91004EF801 /* GiGaSettingsViewCell.m */; };
83BFAE78213CDE91004EF801 /* GiGaSettingsViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 83BFAE76213CDE91004EF801 /* GiGaSettingsViewCell.xib */; };
83BFAE7B213D3F3A004EF801 /* MaskTimeCircularProgressView.m in Sources */ = {isa = PBXBuildFile; fileRef = 83BFAE7A213D3F3A004EF801 /* MaskTimeCircularProgressView.m */; };
83E40B2B21218B6F008149C4 /* GiGaExercisesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83E40B2A21218B6F008149C4 /* GiGaExercisesViewController.m */; };
83E40B2F21218BA0008149C4 /* GiGaUserViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83E40B2E21218BA0008149C4 /* GiGaUserViewController.m */; };
/* End PBXBuildFile section */
@ -144,6 +151,17 @@
83346AD6212C18F50054D597 /* GiGaAppGaurdVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaAppGaurdVC.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>"; };
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>"; };
8340BFA1213E60DD008F22E4 /* GIGAMBHUDHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GIGAMBHUDHelper.m; sourceTree = "<group>"; };
8340BFA3213E638A008F22E4 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Main.strings"; sourceTree = "<group>"; };
8340BFA4213E638A008F22E4 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/LaunchScreen.strings"; sourceTree = "<group>"; };
8340BFA5213E6514008F22E4 /* Localizable.strings */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; path = Localizable.strings; sourceTree = "<group>"; };
8340BFA8213E65CA008F22E4 /* GIGACommonLocalizabe.strings */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; path = GIGACommonLocalizabe.strings; sourceTree = "<group>"; };
8340BFAA213E665D008F22E4 /* GIGAUserLocalizable.strings */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; path = GIGAUserLocalizable.strings; sourceTree = "<group>"; };
8340BFAD213E739D008F22E4 /* GiGaNoNetWorkView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaNoNetWorkView.h; sourceTree = "<group>"; };
8340BFAE213E739D008F22E4 /* GiGaNoNetWorkView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaNoNetWorkView.m; sourceTree = "<group>"; };
8342D9FC2131150200D16B1D /* 4481.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = 4481.wav; 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>"; };
@ -292,6 +310,8 @@
83BFAE74213CDE91004EF801 /* GiGaSettingsViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaSettingsViewCell.h; sourceTree = "<group>"; };
83BFAE75213CDE91004EF801 /* GiGaSettingsViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaSettingsViewCell.m; sourceTree = "<group>"; };
83BFAE76213CDE91004EF801 /* GiGaSettingsViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GiGaSettingsViewCell.xib; sourceTree = "<group>"; };
83BFAE79213D3F3A004EF801 /* MaskTimeCircularProgressView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MaskTimeCircularProgressView.h; sourceTree = "<group>"; };
83BFAE7A213D3F3A004EF801 /* MaskTimeCircularProgressView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MaskTimeCircularProgressView.m; sourceTree = "<group>"; };
83E40B2921218B6F008149C4 /* GiGaExercisesViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaExercisesViewController.h; sourceTree = "<group>"; };
83E40B2A21218B6F008149C4 /* GiGaExercisesViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaExercisesViewController.m; sourceTree = "<group>"; };
83E40B2D21218BA0008149C4 /* GiGaUserViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaUserViewController.h; sourceTree = "<group>"; };
@ -360,6 +380,34 @@
path = Source;
sourceTree = "<group>";
};
8340BF9F213E6080008F22E4 /* GIGAMBHUDHelper */ = {
isa = PBXGroup;
children = (
8340BFA0213E60DD008F22E4 /* GIGAMBHUDHelper.h */,
8340BFA1213E60DD008F22E4 /* GIGAMBHUDHelper.m */,
);
path = GIGAMBHUDHelper;
sourceTree = "<group>";
};
8340BFA7213E6532008F22E4 /* Localizable */ = {
isa = PBXGroup;
children = (
8340BFA5213E6514008F22E4 /* Localizable.strings */,
8340BFA8213E65CA008F22E4 /* GIGACommonLocalizabe.strings */,
8340BFAA213E665D008F22E4 /* GIGAUserLocalizable.strings */,
);
path = Localizable;
sourceTree = "<group>";
};
8340BFAC213E7374008F22E4 /* Views */ = {
isa = PBXGroup;
children = (
8340BFAD213E739D008F22E4 /* GiGaNoNetWorkView.h */,
8340BFAE213E739D008F22E4 /* GiGaNoNetWorkView.m */,
);
path = Views;
sourceTree = "<group>";
};
835060A6212D38BC007E6220 /* GiGaStartAdView */ = {
isa = PBXGroup;
children = (
@ -429,6 +477,8 @@
83A2270B212A97ED00B3E75C /* MaskViewBootomWaringView.m */,
83928FF82134D8F60077D2E8 /* GiGaFlyingCommitInputView.h */,
83928FF92134D8F60077D2E8 /* GiGaFlyingCommitInputView.m */,
83BFAE79213D3F3A004EF801 /* MaskTimeCircularProgressView.h */,
83BFAE7A213D3F3A004EF801 /* MaskTimeCircularProgressView.m */,
);
path = View;
sourceTree = "<group>";
@ -501,6 +551,7 @@
8361B3D2212155C300238FEB /* Assets.xcassets */,
8361B3D4212155C300238FEB /* LaunchScreen.storyboard */,
8361B3D7212155C300238FEB /* Info.plist */,
8340BFA7213E6532008F22E4 /* Localizable */,
8361B3D8212155C300238FEB /* main.m */,
8361B3FB21215BE900238FEB /* GIGA.pch */,
);
@ -528,6 +579,8 @@
8361B3FC21215C7400238FEB /* Common */ = {
isa = PBXGroup;
children = (
8340BFAC213E7374008F22E4 /* Views */,
8340BF9F213E6080008F22E4 /* GIGAMBHUDHelper */,
83928FFF2134F4230077D2E8 /* LXDanMuManager */,
83928FFB2134F37D0077D2E8 /* SocketRocketUtility */,
838388CB212FB7D700D14C53 /* JXTAlertManager */,
@ -571,6 +624,8 @@
83835BCC212E856A001480F2 /* NSString+MD5.m */,
838500DA2137F3F7003514A3 /* GiGaAttributedLabel.h */,
838500DB2137F3F7003514A3 /* GiGaAttributedLabel.m */,
8340BF9C213E3846008F22E4 /* SHineLabel.h */,
8340BF9D213E3846008F22E4 /* SHineLabel.m */,
);
path = Category;
sourceTree = "<group>";
@ -1048,9 +1103,12 @@
83346AD1212BF5B70054D597 /* useragreement.html in Resources */,
838388CA212FA00200D14C53 /* MaskTime.png in Resources */,
83BFAE68213CCF10004EF801 /* GiGaMineUserViewCell.xib in Resources */,
8340BFA9213E65CA008F22E4 /* GIGACommonLocalizabe.strings in Resources */,
83835BA8212E4748001480F2 /* MAssaageCenterCell.xib in Resources */,
8361B3D3212155C300238FEB /* Assets.xcassets in Resources */,
8340BFA6213E6514008F22E4 /* Localizable.strings in Resources */,
8361B3D1212155C200238FEB /* Main.storyboard in Resources */,
8340BFAB213E665D008F22E4 /* GIGAUserLocalizable.strings in Resources */,
8342D9FD2131150200D16B1D /* 4481.wav in Resources */,
83835BB0212E4FCD001480F2 /* MessageListViewCell.xib in Resources */,
83346ACF212BD7830054D597 /* GiGaWebViewController.xib in Resources */,
@ -1155,6 +1213,7 @@
8349585C212511040064DB6C /* AppDelegate+ThirdParty.m in Sources */,
83BFAE73213CDB58004EF801 /* GiSysSettingsVC.m in Sources */,
838500DC2137F3F7003514A3 /* GiGaAttributedLabel.m in Sources */,
83BFAE7B213D3F3A004EF801 /* MaskTimeCircularProgressView.m in Sources */,
8314D2112133ABE500B458BF /* WeiIXinApiManager.m in Sources */,
83835BCA212E8045001480F2 /* GIGAQuetionView.m in Sources */,
8361B3CE212155C200238FEB /* ViewController.m in Sources */,
@ -1186,9 +1245,11 @@
838388C8212F9C4200D14C53 /* GiGaLocalNotificationManager.m in Sources */,
83835BBC212E60E5001480F2 /* MessageDetailViewController.m in Sources */,
83835BCD212E856A001480F2 /* NSString+MD5.m in Sources */,
8340BFA2213E60DD008F22E4 /* GIGAMBHUDHelper.m in Sources */,
83835BC7212E7BBF001480F2 /* GiGaNavTitileView.m in Sources */,
8361B4322121832800238FEB /* GiGaBaseViewController.m in Sources */,
8357ADD32123C7C6000816F2 /* GiGaAPIResult.m in Sources */,
8340BF9E213E3846008F22E4 /* SHineLabel.m in Sources */,
8361B4352121836700238FEB /* GiGaBaseNavViewController.m in Sources */,
835060B3212D54C2007E6220 /* GiGaAdDetailViewController.m in Sources */,
83346AC0212BB50A0054D597 /* PassWordResetVC.m in Sources */,
@ -1206,6 +1267,7 @@
83835BA7212E4748001480F2 /* MAssaageCenterCell.m in Sources */,
836EE5D42136454500F0ABB2 /* RegistGetSMSCodeRequest.m in Sources */,
8361B42E2121812000238FEB /* GiGaServerConfig.m in Sources */,
8340BFAF213E739D008F22E4 /* GiGaNoNetWorkView.m in Sources */,
836EE5DA2136716100F0ABB2 /* NSTimer+Convenience.m in Sources */,
83A22712212A9EA900B3E75C /* UIView+Sizes.m in Sources */,
839290092134F4C40077D2E8 /* GiGaFlingCommitVC.m in Sources */,
@ -1252,6 +1314,7 @@
isa = PBXVariantGroup;
children = (
8361B3D0212155C200238FEB /* Base */,
8340BFA3213E638A008F22E4 /* zh-Hans */,
);
name = Main.storyboard;
sourceTree = "<group>";
@ -1260,6 +1323,7 @@
isa = PBXVariantGroup;
children = (
8361B3D5212155C300238FEB /* Base */,
8340BFA4213E638A008F22E4 /* zh-Hans */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
@ -1271,6 +1335,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
@ -1329,6 +1394,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";

View File

@ -48,10 +48,11 @@
self.window.rootViewController = self.rootTabBarVC;
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
}
-(void)initTabItems{
UITabBar *tabBar = self.rootTabBarVC.tabBar;
UITabBarItem *item0 = [tabBar.items objectAtIndex:0];
UITabBarItem *item1 = [tabBar.items objectAtIndex:1];
@ -69,7 +70,6 @@
;
item2.image = [[UIImage imageNamed:@""] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
}
-(void)configEnvironment{
@ -81,10 +81,11 @@
GiGaMaskTaskViewController *maskeVC = [[GiGaMaskTaskViewController alloc] init];
GiGaBaseNavViewController *maskNav =[[GiGaBaseNavViewController alloc] initWithRootViewController:maskeVC];
maskNav.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName : [UIColor blackColor]};
maskeVC.title = @"面膜时间";
[maskeVC addNavTitile:GIGALocalComm(@"masktime_nav_title")];
self.window.rootViewController = maskNav;
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
}
-(void)creatAdView{
@ -109,8 +110,6 @@
//
[[UIApplication sharedApplication] registerUserNotificationSettings:setings];
}
}
// ios 8
@ -121,7 +120,6 @@
[[GiGaLocalNotificationManager localNotifiationCenter] didResaveloaclNitification:notification];
}
}

View File

@ -40,7 +40,6 @@
apsForProduction:GIGA_PUSH_ENVIRONMENT
advertisingIdentifier:nil];
//
[WXApi registerApp:WXin_APPID];
//bugly

View File

@ -43,14 +43,12 @@
}
- (void)applicationDidEnterBackground:(UIApplication *)application {
// app
if (_isMasking) {
[self creatBackGoundTask];
}
}
-(void)creatBackGoundTask{

View File

@ -1,93 +1,111 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"idiom" : "iphone",
"filename" : "icon_20pt@2x.png",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"idiom" : "iphone",
"filename" : "icon_20pt@3x.png",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"idiom" : "iphone",
"filename" : "icon_29pt@2x.png",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"idiom" : "iphone",
"filename" : "icon_29pt@3x.png",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"idiom" : "iphone",
"filename" : "icon_40pt@2x.png",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"idiom" : "iphone",
"filename" : "icon_40pt@3x.png",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"idiom" : "iphone",
"filename" : "icon_60pt@2x.png",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"idiom" : "iphone",
"filename" : "icon_60pt@3x.png",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"idiom" : "ipad",
"filename" : "icon_20pt@1x.png",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"idiom" : "ipad",
"filename" : "icon_20pt@2x-1.png",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"idiom" : "ipad",
"filename" : "icon_29pt@1x.png",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"idiom" : "ipad",
"filename" : "icon_29pt@2x-1.png",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"idiom" : "ipad",
"filename" : "icon_40pt@1x.png",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"idiom" : "ipad",
"filename" : "icon_40pt@2x-1.png",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"idiom" : "ipad",
"filename" : "icon_76pt@1x.png",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"idiom" : "ipad",
"filename" : "icon_76pt@2x.png",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "icon_83.5pt@2x.png",
"scale" : "2x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "icon_appstore.png",
"scale" : "1x"
}
],

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 KiB

View File

@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}

View File

@ -0,0 +1,18 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "hud_error@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "hud_error@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

@ -0,0 +1,18 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "hud_info@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "hud_info@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

View File

@ -0,0 +1,18 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "hud_ok@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "hud_ok@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

View File

@ -0,0 +1,19 @@
//
// SHineLabel.h
// GIGA
//
// Created by lianxiang on 2018/9/4.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface SHineLabel : UILabel
//外光
@property(nonatomic,retain) UIColor *outLineColor;
//里光
@property(nonatomic,retain) UIColor *oinsideColor;
//光晕
@property(nonatomic,retain) UIColor *blurColor;
@end

View File

@ -0,0 +1,43 @@
//
// SHineLabel.m
// GIGA
//
// Created by lianxiang on 2018/9/4.
// Copyright © 2018 com.giga.ios. All rights reserved.
//
#import "SHineLabel.h"
@implementation SHineLabel
- (instancetype)init
{
self = [super init];
if (self) {
}
return self;
}
-(void)drawRect:(CGRect)rect{
CGContextRef ctx = UIGraphicsGetCurrentContext();
CGContextSetStrokeColorWithColor(ctx, self.outLineColor.CGColor);
CGContextSetFillColorWithColor(ctx, self.oinsideColor.CGColor);
CGContextSetLineWidth(ctx, self.font.pointSize /60.0);
CGContextSetShadowWithColor(ctx, CGSizeMake(0, 0), self.font.pointSize / 3 , self.blurColor.CGColor);
CGTextDrawingMode mode = !self.outLineColor ? kCGTextFill:(!self.oinsideColor ? kCGTextStroke:kCGTextFillStroke);
CGContextSetTextDrawingMode(ctx, mode);
NSMutableParagraphStyle *paragraStyle = [[NSMutableParagraphStyle alloc] init];
paragraStyle.alignment = NSTextAlignmentCenter;
[self.text drawInRect:self.bounds withAttributes:@{NSFontAttributeName:[UIFont fontWithName:@"PingFangSC-Semibold" size:22],NSForegroundColorAttributeName:[UIColor whiteColor],NSKernAttributeName:@(4),NSParagraphStyleAttributeName:paragraStyle}];
}
-(void)dealloc{
self.outLineColor = nil;
self.oinsideColor = nil;
self.blurColor = nil;
}
@end

View File

@ -15,6 +15,6 @@
//设置透明导航
-(void)setClearNav;
-(void)resetBackgroundImage;
-(void)setBackgroundImage;
@end

View File

@ -24,13 +24,14 @@ static char overlayKey;
{
if (!self.overlay) {
[self setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
self.overlay = [[UIView alloc] initWithFrame:CGRectMake(0, -20, [UIScreen mainScreen].bounds.size.width, CGRectGetHeight(self.bounds) + 20)];
self.overlay = [[UIView alloc] initWithFrame:CGRectMake(0, -PhoneX_STATUBAR_H, [UIScreen mainScreen].bounds.size.width, CGRectGetHeight(self.bounds) + PhoneX_STATUBAR_H)];
self.overlay.userInteractionEnabled = NO;
self.overlay.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
//self.overlay.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
[self insertSubview:self.overlay atIndex:0];
}
self.overlay.backgroundColor = backgroundColor;
self.overlay.backgroundColor = [backgroundColor colorWithAlphaComponent:0.2];
}
- (void)cnReset
@ -54,11 +55,9 @@ static char overlayKey;
}
-(void)resetBackgroundImage{
-(void)setBackgroundImage{
[self setBackgroundImage:[UIImage imageNamed:@""] forBarMetrics:UIBarMetricsDefault];
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:NO];
}

View File

@ -24,7 +24,7 @@
-(UIStatusBarStyle)preferredStatusBarStyle
{
return UIStatusBarStyleDefault;
return UIStatusBarStyleLightContent;
}
-(void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated

View File

@ -7,16 +7,17 @@
//
#import <UIKit/UIKit.h>
#import "GiGaNoNetWorkView.h"
@interface GiGaBaseViewController : UIViewController<UITableViewDelegate,UITableViewDataSource>
{
UIView *_emptyView;
UIView *_noNetWorkView;
GiGaNoNetWorkView *_noNetWorkView;
UITableView *_tableView;
}
@property (nonatomic,strong) UIView * emptyView;
@property (nonatomic,strong) UIView * noNetWorkView;
@property (nonatomic,strong) GiGaNoNetWorkView * noNetWorkView;
@property (nonatomic,strong) UITableView *tableView;
@ -26,9 +27,13 @@
@property (nonatomic, assign) AFNetworkReachabilityStatus currentNetworkStatus;
- (void)showNoNetWorkView;
- (void)showEmptyView;
- (void)removeNoNetWorkView;
-(void)addNavTitile:(NSString *)title;
- (void)showEmptyView;
- (void)removeEmtyView;
- (void)addNavTitile:(NSString *)title;
@end

View File

@ -24,6 +24,8 @@
[super viewDidLoad];
// Do any additional setup after loading the view.
[self.navigationController.navigationBar cnSetBackgroundColor:GIGARGB(216, 216, 216, 1)];
}
@ -33,8 +35,10 @@
}
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
//[self.navigationController.navigationBar cnSetBackgroundColor:GIGAUIColorFromRGB_A(0xD8D8D8, 0.2)];
}
-(void)addNavTitile:(NSString *)title{
@ -43,9 +47,13 @@
}
//
- (void)showNoNetWorkView
{
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
// if (self.currentNetworkStatus < 1) {
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
@ -55,8 +63,27 @@
// });
}
- (void)removeNoNetWorkView{
if (_noNetWorkView) {
[_noNetWorkView removeFromSuperview];
_noNetWorkView = nil;
}
}
- (UIView *)noNetWorkView{
if (!_noNetWorkView) {
_noNetWorkView = [GiGaNoNetWorkView new];
}
return _noNetWorkView;
}
-(void)showEmptyView{
}
- (void)removeEmtyView{
}
-(void)testNetworkStatus{

View File

@ -0,0 +1,35 @@
//
// GIGAMBHUDHelper.h
// GIGA
//
// Created by lianxiang on 2018/9/4.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "MBProgressHUD.h"
@interface GIGAMBHUDHelper : NSObject
/**
* Paramas is hud, notic MBProgress message.
*/
+ (void)networkError:(MBProgressHUD *)hud;
+ (void)networkError:(MBProgressHUD *)hud
title:(NSString *)aTitle;
+ (void)networkSucc:(MBProgressHUD *)hud
title:(NSString *)aTitle;
+ (void)networkInfo:(MBProgressHUD *)hud
title:(NSString *)aTitle;
/**
* Paramas is view, notic MBProgress message in view.
*/
+ (void)networkErrorAddto:(UIView *)aView;
+ (void)networkErrorAddto:(UIView *)aView
title:(NSString *)aTitle;
+ (void)networkSuccAddto:(UIView *)aView
title:(NSString *)aTitle;
+ (void)networkInfoAddto:(UIView *)aView
title:(NSString *)aTitle;
+ (void)messageAddto:(UIView *)aView title:(NSString *)aTitle;
@end

View File

@ -0,0 +1,91 @@
//
// GIGAMBHUDHelper.m
// GIGA
//
// Created by lianxiang on 2018/9/4.
// Copyright © 2018 com.giga.ios. All rights reserved.
//
#import "GIGAMBHUDHelper.h"
@implementation GIGAMBHUDHelper
+ (void)networkError:(MBProgressHUD *)hud
{
hud.mode = MBProgressHUDModeCustomView;
hud.customView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"hud_error"]];
hud.labelText = GIGALocalComm(@"toast_hud_net_error");
[hud hide:YES afterDelay:HUD_DISPLAY_DURATION];
}
+ (void)networkError:(MBProgressHUD *)hud
title:(NSString *)aTitle
{
hud.mode = MBProgressHUDModeCustomView;
hud.customView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"hud_error"]];
hud.labelText = aTitle;
[hud hide:YES afterDelay:HUD_DISPLAY_DURATION];
}
+ (void)networkSucc:(MBProgressHUD *)hud
title:(NSString *)aTitle
{
hud.mode = MBProgressHUDModeCustomView;
hud.customView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"hud_ok"]];
hud.labelText = aTitle;
[hud hide:YES afterDelay:HUD_DISPLAY_DURATION];
}
+ (void)networkInfo:(MBProgressHUD *)hud
title:(NSString *)aTitle
{
hud.mode = MBProgressHUDModeCustomView;
hud.customView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"hud_info"]];
hud.labelText = aTitle;
[hud hide:YES afterDelay:HUD_DISPLAY_DURATION];
}
/**
* Paramas is view, notic MBProgress message in view.
*/
+ (void)networkErrorAddto:(UIView *)aView
{
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:aView animated:YES];
hud.mode = MBProgressHUDModeCustomView;
hud.customView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"hud_error"]];
hud.labelText = GIGALocalComm(@"");
[hud hide:YES afterDelay:HUD_DISPLAY_DURATION];
}
+ (void)networkErrorAddto:(UIView *)aView
title:(NSString *)aTitle
{
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:aView animated:YES];
hud.mode = MBProgressHUDModeCustomView;
hud.customView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"hud_error"]];
hud.labelText = aTitle;
[hud hide:YES afterDelay:HUD_DISPLAY_DURATION];
}
+ (void)networkSuccAddto:(UIView *)aView
title:(NSString *)aTitle
{
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:aView animated:YES];
hud.mode = MBProgressHUDModeCustomView;
hud.customView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"hud_ok"]];
hud.labelText = aTitle;
[hud hide:YES afterDelay:HUD_DISPLAY_DURATION];
}
+ (void)networkInfoAddto:(UIView *)aView
title:(NSString *)aTitle
{
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:aView animated:YES];
hud.mode = MBProgressHUDModeCustomView;
hud.customView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"hud_info"]];
hud.labelText = aTitle;
[hud hide:YES afterDelay:HUD_DISPLAY_DURATION];
}
+ (void)messageAddto:(UIView *)aView title:(NSString *)aTitle
{
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:aView animated:YES];
hud.labelText = aTitle;
[hud hide:YES afterDelay:1.0f];
}
@end

View File

@ -14,7 +14,8 @@
{
if (self = [super initWithFrame:frame]) {
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, 44)];
label.textColor = GIGAUIColorFromRGBA(0x777777);
//label.textColor = GIGAUIColorFromRGBA(0x777777);
label.textColor = [UIColor whiteColor];
label.text = str;
label.font = [UIFont fontWithName:@"PingFangSC-Medium" size:18.f];
label.textAlignment = NSTextAlignmentCenter;

View File

@ -0,0 +1,13 @@
//
// GiGaNoNetWorkView.h
// GIGA
//
// Created by lianxiang on 2018/9/4.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface GiGaNoNetWorkView : UIView
@end

View File

@ -0,0 +1,23 @@
//
// GiGaNoNetWorkView.m
// GIGA
//
// Created by lianxiang on 2018/9/4.
// Copyright © 2018 com.giga.ios. All rights reserved.
//
#import "GiGaNoNetWorkView.h"
@implementation GiGaNoNetWorkView
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
}
return self;
}
@end

View File

@ -81,9 +81,23 @@ alpha:((float)(rgbValue & 0xFF))/255.0]
#define GIGA_WIndowTost(__toast__) [[UIApplication sharedApplication].keyWindow makeToast:(__toast__) duration:1.5 position:CSToastPositionCenter];
//X
//底部工具栏需要为home indicator留出34pt边距
#define PhoneX_BottomMargin ([UIScreen mainScreen].bounds.size.height == 812.0 ? 34.0 :0.0)
//状态栏高度由20pt变成44pt导航栏以上变化64->88。
#define PhoneX_TopMargin ([UIScreen mainScreen].bounds.size.height == 812.0 ? 24.0 :0.0)
#define PhoneX_STATUBAR_H ([UIScreen mainScreen].bounds.size.height == 812.0 ? 44.0 :20.0)
#define GIGA_FONTNAME @"PingFangSC-Medium"
#define GIGA_FONTBOLD @"PingFangSC-Semibold"
//国际化
#define GIGALocalComm(key) NSLocalizedStringFromTable(key, @"GIGACommonLocalizabe", nil)
//个人中心
#define GIGALocalUser(key) NSLocalizedStringFromTable(key, @"GIGAUserLocalizable", nil)
//HUD
#define HUD_DISPLAY_DURATION 2
#define HUD_TIMEOUT_DURATION 8
#endif /* GIGA_h */

View File

@ -14,16 +14,18 @@
#if defined(DEBUG) || defined(RELEASE_VERTION_TEST)
#endif
switch (type) {
case 0://
{
[[NSUserDefaults standardUserDefaults] setValue:@"http://apiyts.s1.natapp.cc/v1/" forKey:@"MainUrl"];
} break;
}
break;
case 1: //
{
[[NSUserDefaults standardUserDefaults] setValue:@"https://" forKey:@"MainUrl"];
} break;
}
break;
default:
break;

View File

@ -0,0 +1,8 @@
/*
GIGACommonLocalizabe.strings
GIGA
Created by lianxiang on 2018/9/4.
Copyright © 2018年 com.giga.ios. All rights reserved.
*/
"masktime_nav_title" = "面膜时间";

View File

@ -0,0 +1,7 @@
/*
GIGAUserLocalizable.strings
GIGA
Created by lianxiang on 2018/9/4.
Copyright © 2018年 com.giga.ios. All rights reserved.
*/

View File

@ -0,0 +1,7 @@
/*
Localizable.strings
GIGA
Created by lianxiang on 2018/9/4.
Copyright © 2018年 com.giga.ios. All rights reserved.
*/

View File

@ -96,7 +96,7 @@
NSDictionary *param = @{
@"mobile":phoneNumber
};
GiGaBaseAPiRequest *api = [GiGaBaseAPiRequest initWithRequestPath:@"msg/sms/v1/sendcode" method:RequestPostMethod parms:param];
GiGaBaseAPiRequest *api = [GiGaBaseAPiRequest initWithRequestPath:@"msg/sms/v1/registersendcode" method:RequestPostMethod parms:param];
[api requstDataWithResult:^(GiGaAPIResult *result) {
[MBProgressHUD hideHUDForView:self.view animated:YES];

View File

@ -27,7 +27,6 @@
@property (weak, nonatomic) IBOutlet UIButton *weiXinLoginBtn;
@property (weak, nonatomic) IBOutlet UIButton *registBtn;
@property (weak, nonatomic) IBOutlet UIImageView *wexinbtnImageView;
@property (weak, nonatomic) IBOutlet UIButton *secretBtn;
@end
@ -36,7 +35,7 @@
- (void)viewDidLoad {
[super viewDidLoad];
self.automaticallyAdjustsScrollViewInsets = NO;
// Do any additional setup after loading the view from its nib.
[self setUpX];
[self textFieldUI];

View File

@ -6,7 +6,6 @@
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
@ -28,139 +27,155 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="img_circle_avatar" translatesAutoresizingMaskIntoConstraints="NO" id="RIl-8E-GcR">
<rect key="frame" x="131" y="102" width="114" height="114"/>
<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"/>
<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"/>
<constraints>
<constraint firstAttribute="height" constant="48" id="vg0-nn-MyL"/>
</constraints>
<nil key="textColor"/>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="12"/>
<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"/>
<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"/>
<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"/>
</textField>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZJU-Uo-5TM">
<rect key="frame" x="65" y="331" 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"/>
<constraints>
<constraint firstAttribute="width" constant="76" id="7Tc-Zf-bbN"/>
<constraint firstAttribute="height" constant="37" id="xjD-it-bBa"/>
</constraints>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="12"/>
<state key="normal" title="忘记密码">
<color key="titleColor" red="0.19215686274509802" green="0.81960784313725488" blue="0.76470588235294112" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="forgetPassBtn:" destination="-1" eventType="touchUpInside" id="GR3-Gw-sRB"/>
</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"/>
<color key="backgroundColor" red="0.0" green="0.87058823529411766" blue="0.74117647058823533" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="42" id="apM-nh-gox"/>
</constraints>
<fontDescription key="fontDescription" name="PingFangSC-Semibold" family="PingFang SC" pointSize="18"/>
<state key="normal" title=" 登录">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</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"/>
<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"/>
</button>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="img_circle_avatar" translatesAutoresizingMaskIntoConstraints="NO" id="RIl-8E-GcR">
<rect key="frame" x="131" y="82" 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" y="523" width="144" height="38"/>
<constraints>
<constraint firstAttribute="height" constant="38" id="l1O-3i-Plv"/>
<constraint firstAttribute="width" constant="144" id="zzO-p2-ENu"/>
</constraints>
<inset key="titleEdgeInsets" minX="-130" minY="0.0" maxX="0.0" maxY="0.0"/>
<inset key="imageEdgeInsets" minX="9" minY="0.0" maxX="0.0" maxY="0.0"/>
<state key="normal" image="btn_wechat">
<attributedString key="attributedTitle">
<fragment content="微信号登录">
<attributes>
<font key="NSFont" size="12" name="PingFangSC-Regular"/>
<paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
</attributes>
</fragment>
</attributedString>
</state>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="F5p-cf-frr">
<rect key="frame" x="108" y="436" width="161" height="40"/>
<constraints>
<constraint firstAttribute="width" constant="161" id="EU3-ax-K1r"/>
<constraint firstAttribute="height" constant="40" id="W9a-lX-GbY"/>
</constraints>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="12"/>
<state key="normal" title="创建账号">
<color key="titleColor" red="0.19215686274509802" green="0.81960784313725488" blue="0.76470588235294112" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
</button>
</subviews>
<constraints>
<constraint firstAttribute="width" secondItem="RIl-8E-GcR" secondAttribute="height" multiplier="1:1" id="bfp-Q6-OmK"/>
<constraint firstItem="RIl-8E-GcR" firstAttribute="top" secondItem="Z8i-yN-1Cd" secondAttribute="top" constant="82" 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"/>
<constraint firstItem="8Of-JP-gMR" firstAttribute="centerX" secondItem="dnL-WV-spY" secondAttribute="centerX" id="PVe-Ht-ZJP"/>
<constraint firstItem="Y1I-OE-6t1" firstAttribute="leading" secondItem="qzA-vE-CGR" secondAttribute="leading" id="Phn-mX-UR9"/>
<constraint firstItem="ZJU-Uo-5TM" firstAttribute="top" secondItem="Y1I-OE-6t1" secondAttribute="bottom" constant="4" id="SMR-RS-X6x"/>
<constraint firstItem="Szo-8C-Zin" firstAttribute="trailing" secondItem="qzA-vE-CGR" secondAttribute="trailing" id="VMD-Z5-VYQ"/>
<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="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="trailing" secondItem="Yiv-h8-4V1" secondAttribute="trailing" constant="65" id="phk-GT-PvS"/>
<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"/>
<constraint firstItem="Yiv-h8-4V1" firstAttribute="leading" secondItem="qzA-vE-CGR" secondAttribute="leading" id="xYo-qi-cOe"/>
</constraints>
</imageView>
<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="232" width="245" height="54"/>
<constraints>
<constraint firstAttribute="height" constant="54" id="593-Iu-1XC"/>
</constraints>
<nil key="textColor"/>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="12"/>
<textInputTraits key="textInputTraits" keyboardType="numberPad"/>
</textField>
<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="302" width="167" height="56"/>
<constraints>
<constraint firstAttribute="height" constant="56" id="36A-Rk-HnV"/>
</constraints>
<nil key="textColor"/>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="12"/>
<textInputTraits key="textInputTraits" keyboardType="numbersAndPunctuation"/>
</textField>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qzA-vE-CGR">
<rect key="frame" x="65" y="286" 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="HWD-IP-ygd"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZJU-Uo-5TM">
<rect key="frame" x="65" y="366" 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="xGp-5h-fFD"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8Of-JP-gMR">
<rect key="frame" x="65" y="444" width="245" height="42"/>
<color key="backgroundColor" red="0.0" green="0.87058823529411766" blue="0.74117647058823533" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="42" id="H8S-wQ-QzQ"/>
</constraints>
<fontDescription key="fontDescription" name="PingFangSC-Semibold" family="PingFang SC" pointSize="18"/>
<state key="normal" title=" 登录">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Szo-8C-Zin">
<rect key="frame" x="246" y="309" width="64" height="42"/>
<constraints>
<constraint firstAttribute="height" constant="42" id="gsN-u1-wM1"/>
<constraint firstAttribute="width" constant="64" id="ulR-IN-Puf"/>
</constraints>
<state key="normal" image="btn_tab_desplay"/>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="F5p-cf-frr">
<rect key="frame" x="107" y="491" width="161" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="aCl-R3-YZF"/>
<constraint firstAttribute="width" constant="161" id="hOA-ag-StR"/>
</constraints>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="12"/>
<state key="normal" title="创建账号">
<color key="titleColor" red="0.19215686274509802" green="0.81960784313725488" blue="0.76470588235294112" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="chq-bd-6sQ">
<rect key="frame" x="246" y="384" width="64" height="49"/>
<constraints>
<constraint firstAttribute="width" constant="64" id="joP-Ev-vou"/>
<constraint firstAttribute="height" constant="49" id="oH5-Gs-uju"/>
</constraints>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="12"/>
<state key="normal" title="忘记密码">
<color key="titleColor" red="0.19215686274509802" green="0.81960784313725488" blue="0.76470588235294112" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="forgetPassBtn:" destination="-1" eventType="touchUpInside" id="GR3-Gw-sRB"/>
<outlet property="delegate" destination="i5M-Pr-FkT" id="BFJ-dW-e5f"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" hasAttributedTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="dnL-WV-spY">
<rect key="frame" x="116" y="554" width="143" height="69"/>
<constraints>
<constraint firstAttribute="height" constant="69" id="n98-b8-MZa"/>
<constraint firstAttribute="width" constant="143" id="r6X-3m-usd"/>
</constraints>
<inset key="titleEdgeInsets" minX="-130" minY="0.0" maxX="0.0" maxY="0.0"/>
<inset key="imageEdgeInsets" minX="9" minY="0.0" maxX="0.0" maxY="0.0"/>
<state key="normal" image="btn_wechat">
<attributedString key="attributedTitle">
<fragment content="微信号登录">
<attributes>
<font key="NSFont" size="12" name="PingFangSC-Regular"/>
<paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
</attributes>
</fragment>
</attributedString>
</state>
</button>
</scrollView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="dnL-WV-spY" firstAttribute="top" secondItem="F5p-cf-frr" secondAttribute="bottom" constant="23" id="0vh-Hr-cIl"/>
<constraint firstItem="8Of-JP-gMR" firstAttribute="width" secondItem="Yiv-h8-4V1" secondAttribute="width" id="1Xh-Cl-oZI"/>
<constraint firstItem="Yiv-h8-4V1" firstAttribute="top" secondItem="RIl-8E-GcR" secondAttribute="bottom" constant="16" id="4qd-F2-kp1"/>
<constraint firstItem="chq-bd-6sQ" firstAttribute="top" secondItem="ZJU-Uo-5TM" secondAttribute="bottom" constant="16" id="68l-K4-uY8"/>
<constraint firstAttribute="trailing" secondItem="qzA-vE-CGR" secondAttribute="trailing" constant="65" id="9hg-No-Rbp"/>
<constraint firstItem="Szo-8C-Zin" firstAttribute="leading" secondItem="Y1I-OE-6t1" secondAttribute="trailing" constant="14" id="Ba4-21-nhi"/>
<constraint firstItem="8Of-JP-gMR" firstAttribute="centerX" secondItem="1vd-yc-0a5" secondAttribute="centerX" id="F77-OA-qbT"/>
<constraint firstItem="Y1I-OE-6t1" firstAttribute="top" secondItem="qzA-vE-CGR" secondAttribute="bottom" constant="14" id="FzB-6D-IYx"/>
<constraint firstItem="Yiv-h8-4V1" firstAttribute="leading" secondItem="1vd-yc-0a5" secondAttribute="leading" constant="65" id="H5c-S5-H7V"/>
<constraint firstItem="RIl-8E-GcR" firstAttribute="centerX" secondItem="1vd-yc-0a5" secondAttribute="centerX" id="KlR-Tg-PMd"/>
<constraint firstItem="F5p-cf-frr" firstAttribute="centerX" secondItem="1vd-yc-0a5" secondAttribute="centerX" id="MgV-ph-Nz2"/>
<constraint firstItem="ZJU-Uo-5TM" firstAttribute="width" secondItem="qzA-vE-CGR" secondAttribute="width" id="Nfi-Mk-t19"/>
<constraint firstItem="ZJU-Uo-5TM" firstAttribute="centerX" secondItem="1vd-yc-0a5" secondAttribute="centerX" id="Qub-d1-Mfd"/>
<constraint firstItem="ZJU-Uo-5TM" firstAttribute="top" secondItem="Y1I-OE-6t1" secondAttribute="bottom" constant="8" id="WmU-UK-hwV"/>
<constraint firstItem="qzA-vE-CGR" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="65" id="ZAX-Q0-wIE"/>
<constraint firstItem="Szo-8C-Zin" firstAttribute="centerY" secondItem="Y1I-OE-6t1" secondAttribute="centerY" id="a5D-rG-Cqf"/>
<constraint firstItem="dnL-WV-spY" firstAttribute="centerX" secondItem="1vd-yc-0a5" secondAttribute="centerX" id="eWL-Ih-wBt"/>
<constraint firstItem="chq-bd-6sQ" firstAttribute="trailing" secondItem="ZJU-Uo-5TM" secondAttribute="trailing" id="f3g-Rk-Fbd"/>
<constraint firstItem="F5p-cf-frr" firstAttribute="top" secondItem="8Of-JP-gMR" secondAttribute="bottom" constant="5" id="hqv-KT-isO"/>
<constraint firstItem="8Of-JP-gMR" firstAttribute="top" secondItem="chq-bd-6sQ" secondAttribute="bottom" constant="11" id="kQN-mZ-Kew"/>
<constraint firstItem="RIl-8E-GcR" firstAttribute="leading" secondItem="1vd-yc-0a5" secondAttribute="leading" constant="131" id="kRM-p6-38K"/>
<constraint firstItem="Szo-8C-Zin" firstAttribute="trailing" secondItem="Yiv-h8-4V1" secondAttribute="trailing" id="py7-9K-mmp"/>
<constraint firstItem="qzA-vE-CGR" firstAttribute="top" secondItem="Yiv-h8-4V1" secondAttribute="bottom" id="uYb-wj-NLt"/>
<constraint firstItem="RIl-8E-GcR" firstAttribute="top" secondItem="1vd-yc-0a5" secondAttribute="top" constant="82" id="vOK-NT-5LM"/>
<constraint firstItem="Yiv-h8-4V1" firstAttribute="centerX" secondItem="1vd-yc-0a5" secondAttribute="centerX" id="y10-W0-LYh"/>
<constraint firstItem="Y1I-OE-6t1" firstAttribute="leading" secondItem="qzA-vE-CGR" secondAttribute="leading" id="zC7-Wr-oTQ"/>
<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"/>
</constraints>
<viewLayoutGuide key="safeArea" id="1vd-yc-0a5"/>
<point key="canvasLocation" x="10.5" y="22.5"/>
<point key="canvasLocation" x="-84.5" y="-2.5"/>
</view>
</objects>
<resources>

View File

@ -7,7 +7,7 @@
//
#import <UIKit/UIKit.h>
@interface GiGaMaskTaskViewController : UIViewController
#import "GiGaBaseViewController.h"
@interface GiGaMaskTaskViewController : GiGaBaseViewController
@end

View File

@ -25,42 +25,61 @@
#import "GiGaMeViewController.h"
#import "GiGaFlyingCommitInputView.h"
#import "GiGaFlingCommitVC.h"
@interface GiGaMaskTaskViewController ()<UITextFieldDelegate>
#import "MaskTimeCircularProgressView.h"
#import "UINavigationBar+Custom.h"
@interface GiGaMaskTaskViewController ()<MaskCirCularProGressViewDelegate>
{
AVAudioPlayer *_musicPalyer;
}
@property(nonatomic,strong)MaskViewBootomWaringView *waringView;
@property(nonatomic,strong)UILabel *countLabel;
@property (strong ,nonatomic) LXCountTimer *timer;
@property(nonatomic,strong)UILabel *descLabl;
@property(nonatomic,strong)UIView *descBackView;
//@property (nonatomic,strong) GiGaFlyingCommitInputView *commitInputView;
@property(nonatomic,strong) UIImageView *maskImageView;
@property(nonatomic,strong) UIImageView *faceView;
//@property(nonatomic,strong) UIDynamicAnimator *animator;
//@property(nonatomic,strong) UIAttachmentBehavior *attachmentBehavior;
@property(nonatomic) CGPoint attachPoint;
//@property(nonatomic) UISnapBehavior *snapBehavior;
@property(nonatomic,strong) MaskTimeCircularProgressView *cicleProgressView;
@end
@implementation GiGaMaskTaskViewController
//label
-(UILabel *)countLabel{
if (!_countLabel) {
_countLabel = [[UILabel alloc] init];
_countLabel.textColor = [UIColor redColor];
_countLabel.text = @"00:00";
_countLabel.textAlignment = NSTextAlignmentCenter;
//label
- (UILabel *)descLabl{
if(!_descLabl){
_descLabl = [[UILabel alloc] init];
_descLabl.text = @"请点击或按住面膜上滑敷到脸部开始倒计时";
_descLabl.textAlignment = NSTextAlignmentCenter;
_descLabl.numberOfLines = 2;
_descLabl.textColor = GIGARGB(89, 216, 197, 1);
_descLabl.font = [UIFont fontWithName:GIGA_FONTNAME size:11];
}
return _countLabel;
return _descLabl;
}
- (UIView *)descBackView{
if(!_descBackView){
_descBackView = [[UIView alloc] init];
_descBackView.layer.borderWidth = 1;
_descBackView.layer.borderColor = GIGARGB(120, 217, 202, 1).CGColor;
_descBackView.layer.masksToBounds = YES;
_descBackView.layer.cornerRadius = 1;
}
return _descBackView;
}
//
- (UIImageView *)maskImageView{
if (!_maskImageView) {
_maskImageView = [[UIImageView alloc] init];
_maskImageView.userInteractionEnabled = YES;
_maskImageView.backgroundColor = [UIColor purpleColor];
//_maskImageView.backgroundColor = [UIColor purpleColor];
_maskImageView.image = [UIImage imageNamed:@"img_bg"];
UIPanGestureRecognizer *pangesture = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panGestureAction:)];
[_maskImageView addGestureRecognizer:pangesture];
}
@ -70,12 +89,36 @@
- (UIImageView *)faceView{
if (!_faceView) {
_faceView = [[UIImageView alloc] init];
_faceView.backgroundColor = [UIColor lightGrayColor];
//_faceView.backgroundColor = [UIColor lightGrayColor];
_faceView.userInteractionEnabled = YES;
_faceView.image = [UIImage imageNamed:@"img_bg_head"];
}
return _faceView;
}
//
- (MaskTimeCircularProgressView *)cicleProgressView{
if (!_cicleProgressView) {
_cicleProgressView = [[MaskTimeCircularProgressView alloc] initWithFrame:CGRectMake(100, 500, 136, 136) backColor:GIGARGB(22, 22, 22, 1) progressColor:[UIColor blueColor] lineWidth:10 timeinterval:10];
_cicleProgressView.delegate = self;
_cicleProgressView.hidden = YES;
}
return _cicleProgressView;
}
//
- (MaskViewBootomWaringView *)waringView{
if (!_waringView) {
self.waringView = [[MaskViewBootomWaringView alloc] init];
self.waringView.frame = CGRectMake(0,CGRectGetMaxY(self.view.frame), self.view.frame.size.width, 60);
}
return _waringView;
}
//
-(void)createInputView{
GiGaFlingCommitVC* GiGaFlingVC = [[GiGaFlingCommitVC alloc] init];
@ -89,32 +132,18 @@
}
-(LXCountTimer *)timer{
if (!_timer) {
_timer = [[LXCountTimer alloc] init];
}
return _timer;
}
//
-(void)panGestureAction:(UIPanGestureRecognizer *)pan{
CGPoint panLocation = [pan locationInView:self.view];
NSLog(@"panlocation.y:%f",panLocation.y);
if (pan.state == UIGestureRecognizerStateBegan) {
[self animaMask];
// self.attachmentBehavior = [[UIAttachmentBehavior alloc] initWithItem:self.faceView attachedToAnchor:self.attachPoint];
// [self.animator addBehavior: self.attachmentBehavior ];
}else if (pan.state == UIGestureRecognizerStateChanged){
// [self.snapBehavior setSnapPoint:self.attachPoint];
// [self.attachmentBehavior setAnchorPoint:panLocation];
}else if (pan.state == UIGestureRecognizerStateEnded){
// [self.animator addBehavior:self.snapBehavior];
// [self.animator removeBehavior:self.attachmentBehavior];
}else{
}
@ -123,20 +152,21 @@
#pragma mark -
-(void)animaMask{
self.descLabl.hidden = YES;
self.descBackView.hidden = YES;
[self.view layoutIfNeeded];
[UIView animateWithDuration:1.0 animations:^{
[self.maskImageView mas_updateConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.attachPoint.y - 50);
make.top.mas_equalTo(self.attachPoint.y - 118);
}];
[self.faceView mas_updateConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.attachPoint.y - 50);
}];
[self.countLabel mas_updateConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.attachPoint.y + 50 + 10);
make.top.mas_equalTo(self.attachPoint.y -174);
}];
[self.view layoutIfNeeded];
} completion:^(BOOL finished) {
self.countLabel.hidden = NO;
self.cicleProgressView.hidden = NO;
self.maskImageView.userInteractionEnabled = NO;
//
[self startMaskTime];
@ -146,28 +176,31 @@
#pragma mark
-(void)endMaskAnimation{
self.countLabel.hidden = YES;
self.cicleProgressView.hidden = YES;
self.descLabl.hidden = NO;
self.descBackView.hidden = NO;
[self.view layoutIfNeeded];
[UIView animateWithDuration:1.0 animations:^{
[self.maskImageView mas_updateConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(100 + 100 + 200);
make.top.mas_equalTo(314 + PhoneX_TopMargin);
}];
[self.faceView mas_updateConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(100);
make.top.mas_equalTo(103 + PhoneX_TopMargin);
}];
[self.view layoutIfNeeded];
} completion:^(BOOL finished) {
self.maskImageView.userInteractionEnabled = YES;
}];
}
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
}
-(void)viewDidAppear:(BOOL)animated{
@ -181,6 +214,7 @@
[self showAPPappGaurdView];
}
}
-(void)viewWillDisappear:(BOOL)animated{
[super viewWillDisappear:animated];
if([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
@ -196,84 +230,83 @@
[self initUI];
[self addNotify];
[self creatBackGroundMusic];
}
-(void)initUI{
self.view.backgroundColor = GIGARGB(56, 56, 56, 1);
[self.view addSubview:self.maskImageView];
[self.view addSubview:self.faceView];
[self.view bringSubviewToFront:self.maskImageView];
[self.view addSubview:self.countLabel];
//self.animator = [[UIDynamicAnimator alloc] initWithReferenceView:self.view];
[self.view addSubview:self.descBackView];
[self.view addSubview:self.cicleProgressView];
//face
[self.faceView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.view.mas_top).offset(100);
make.left.mas_equalTo(self.view.mas_centerX).offset(-50);
make.size.mas_equalTo(CGSizeMake(100, 100));
make.top.mas_equalTo(self.view.mas_top).offset(103 + PhoneX_TopMargin);
make.left.mas_equalTo(self.view.mas_centerX).offset(-69);
make.size.mas_equalTo(CGSizeMake(138, 174));
}];
//mask
[self.maskImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.view.mas_top).offset(100 + 100 + 200);
make.left.mas_equalTo(self.view.mas_centerX).offset(-50);
make.size.mas_equalTo(CGSizeMake(100, 100));
make.top.mas_equalTo(self.view.mas_top).offset(314 + PhoneX_TopMargin);
make.left.mas_equalTo(self.view.mas_centerX).offset(-51);
make.size.mas_equalTo(CGSizeMake(102, 118));
}];
[self.countLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.view.mas_top).offset(200);
make.width.and.height.mas_equalTo(100);
//
[self.descBackView mas_makeConstraints:^(MASConstraintMaker *make){
make.top.mas_equalTo(500 + PhoneX_TopMargin);
make.width.mas_equalTo(149);
make.height.mas_equalTo(45);
make.centerX.mas_equalTo(self.view.mas_centerX);
}];
self.countLabel.hidden = YES;
UIButton *testBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[testBtn setTitle:@"测试肤质" forState:UIControlStateNormal];
[testBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
testBtn.backgroundColor = [UIColor blueColor];
[testBtn addTarget:self action:@selector(testBtnAcion:) forControlEvents:UIControlEventTouchUpInside];
testBtn.layer.masksToBounds = YES;
testBtn.layer.cornerRadius = 4;
[self.view addSubview:testBtn];
[testBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self.view.mas_centerX);
make.width.mas_equalTo(150);
make.height.mas_equalTo(40);
make.bottom.mas_equalTo(self.view.mas_bottom).offset(-130);
}];
[self.descBackView addSubview:self.descLabl];
[self.descLabl mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(121);
make.height.mas_equalTo(32);
make.center.mas_equalTo(self.descBackView.center);
}];
// UIButton *testBtn = [UIButton buttonWithType:UIButtonTypeCustom];
// [testBtn setTitle:@"测试肤质" forState:UIControlStateNormal];
// [testBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
// testBtn.backgroundColor = [UIColor blueColor];
// [testBtn addTarget:self action:@selector(testBtnAcion:) forControlEvents:UIControlEventTouchUpInside];
// testBtn.layer.masksToBounds = YES;
// testBtn.layer.cornerRadius = 4;
// [self.view addSubview:testBtn];
//
// [testBtn mas_makeConstraints:^(MASConstraintMaker *make) {
// make.centerX.mas_equalTo(self.view.mas_centerX);
// make.width.mas_equalTo(150);
// make.height.mas_equalTo(40);
// make.bottom.mas_equalTo(self.view.mas_bottom).offset(-130);
// }];
[self.view layoutIfNeeded];
CGFloat Y = CGRectGetMinY(self.maskImageView.frame) - 100;
CGFloat Y = CGRectGetMaxY(self.faceView.frame) + (CGRectGetMaxY(self.maskImageView.frame) - CGRectGetMaxY(self.faceView.frame)) / 2;
CGFloat X = CGRectGetMidX(self.view.frame);
// 
CGPoint anchorPoint = CGPointMake(X, Y);
self.attachPoint = anchorPoint;
// self.snapBehavior = [[UISnapBehavior alloc] initWithItem:self.maskImageView snapToPoint:self.attachPoint];
}
#pragma mark
-(void)countTimeBegain:(NSUInteger)hour minute:(NSUInteger)minute second:(NSUInteger)second{
long nowTimestamp = [GiGaHelper getNowDateTimestamp];
long futrueTimestamp = [GiGaHelper getFutureTimetstamp:hour minute:minute second:second];
weakify(self);
[self.timer countDownWithStratTimeStamp:nowTimestamp finishTimeStamp:futrueTimestamp completeBlock:^(NSInteger day, NSInteger hour, NSInteger minute, NSInteger second) {
[weakSelf refreshTimeCount:hour minute:minute second:second];
[self.cicleProgressView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(Y + 68);
make.height.and.width.mas_equalTo(136);
make.centerX.mas_equalTo(self.view.mas_centerX);
}];
}
-(void)refreshTimeCount:(NSInteger)hour minute:(NSInteger)minute second:(NSInteger)second{
self.countLabel.text = [NSString stringWithFormat:@"%02ld:%02ld",minute,second];
if (hour == 0 && minute == 0 && second == 0) {
//
[self maskTimeEnd];
}
}
#pragma mark
@ -286,14 +319,14 @@
_musicPalyer = player;
[[AVAudioSession sharedInstance] setActive:YES error:nil];
//
//[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback withOptions:AVAudioSessionCategoryOptionMixWithOthers error:nil];
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback withOptions:AVAudioSessionCategoryOptionMixWithOthers error:nil];
}
#pragma mark
-(void)startMaskTime{
[self createInputView]; //
//[self createInputView]; //
AppDelegate *delegate =(AppDelegate *) [[UIApplication sharedApplication] delegate];
if (delegate.isMasking) {
return;
@ -303,17 +336,12 @@
[self setBackGroundPlayingInfo];//
// s
NSTimeInterval timeInterVal = 61;
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];
NSTimeInterval timeInterVal = 10;
[self.cicleProgressView startWith:timeInterVal];
//
[self showWaringView];
return;
//app showAlert
[[GiGaLocalNotificationManager localNotifiationCenter] sendLocalNotification:@"本地推送" fireTimeInterval:timeInterVal alertAction:@"测试面膜时间" withIdentifier:kLOCALNotifiID_MASKETIMEEND];
@ -368,7 +396,7 @@
AppDelegate *delegate =(AppDelegate *) [[UIApplication sharedApplication] delegate];
delegate.isMasking = NO;
[_musicPalyer stop];
[self.timer destoryTimer];
//
[self endMaskAnimation];
}
@ -390,8 +418,6 @@
}
}
-(void)addNotify{
NC_ADD_TARGET_NAME_OBJECT(self, @selector(guardViewDissmiss), USER_GUARD_DISSMISS, nil) ;
@ -465,6 +491,8 @@
[rightBtn setImage:[UIImage imageNamed:@""] forState:UIControlStateNormal];
[rightBtn addTarget:self action:@selector(rightBtnAction) forControlEvents:UIControlEventTouchUpInside];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:rightBtn];
[self.navigationController.navigationBar cnSetBackgroundColor:GIGARGB(216, 216, 216, 1)];
}
#pragma mark action
@ -494,29 +522,22 @@
#pragma mark -bottomView
-(void)showWaringView{
[UIView animateWithDuration:0.4 animations:^{
self.waringView.frame = CGRectMake(0,self.view.frame.size.height - 60, self.view.frame.size.width, 60);
}];
[self.view addSubview:self.waringView];
weakify(self);
[self.waringView.dismissBtn initWithBlock:^(UIButton *btn) {
NSLog(@"GIGAdismissBtn");
[UIView animateWithDuration:0.4 animations:^{
weakSelf.waringView.frame = CGRectMake(0, self.view.frame.size.height, self.view.frame.size.height, 60);
} completion:^(BOOL finished) {
[weakSelf.waringView removeFromSuperview];
}];
} for:UIControlEventTouchUpInside ];
[UIView animateWithDuration:0.4 animations:^{
self.waringView.frame = CGRectMake(0,CGRectGetMaxY(self.view.frame) - 60, self.view.frame.size.width, 60);
}];
[self.waringView showView];
}
- (MaskViewBootomWaringView *)waringView{
#pragma mark - MaskCirCularProGressViewDelegate
if (!_waringView) {
self.waringView = [[MaskViewBootomWaringView alloc] initWithFrame: CGRectMake(0, self.view.frame.size.height, self.view.frame.size.height, 60)];
}
return _waringView;
- (void)updateProgressViewWith:(NSTimeInterval)timeInterval{
}
- (void)progressDidFish{
NSLog(@"结束");
[self maskTimeEnd];
}
- (void)didReceiveMemoryWarning {

View File

@ -0,0 +1,39 @@
//
// MaskTimeCircularProgressView.h
// GIGA
//
// Created by lianxiang on 2018/9/3.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import "SHineLabel.h"
@protocol MaskCirCularProGressViewDelegate<NSObject>
@optional
-(void)updateProgressViewWith:(NSTimeInterval)timeInterval;
-(void)updateProgress;
-(void)progressDidFish;
@end
@interface MaskTimeCircularProgressView : UIView
@property(nonatomic,weak) id<MaskCirCularProGressViewDelegate>delegate;
@property(nonatomic) UIColor *backColor;
@property(nonatomic) UIColor *progressColor;
@property(nonatomic,strong) UILabel *countDownLabel;
@property(nonatomic) NSTimeInterval timeinterval;
@property(nonatomic) CGFloat lineWidth;
@property(nonatomic) BOOL isMoving;
@property (nonatomic,strong) SHineLabel *countLabel;
-(id)initWithFrame:(CGRect)frame
backColor:(UIColor *)backColor
progressColor:(UIColor *)progressColor
lineWidth:(CGFloat)lineWidth
timeinterval:(NSTimeInterval)timeinterval;
-(void)startWith:(NSTimeInterval)time;
-(void)stop;
-(void)pasuse;
@end

View File

@ -0,0 +1,261 @@
//
// MaskTimeCircularProgressView.m
// GIGA
//
// Created by lianxiang on 2018/9/3.
// Copyright © 2018 com.giga.ios. All rights reserved.
//
#import "MaskTimeCircularProgressView.h"
#import "LXCountTimer.h"
#import "SHineLabel.h"
@interface MaskTimeCircularProgressView()
@property (nonatomic) CADisplayLink *displayLink;
@property (nonatomic) CAShapeLayer *progressLayer;
@property (nonatomic) float progress;
@property (nonatomic) CGFloat angle;
@property (nonatomic) NSTimeInterval currentTimeinterval;
@property (nonatomic,strong) LXCountTimer *timer;
@property (nonatomic,strong) NSTimer *playTimer;
@end
@implementation MaskTimeCircularProgressView
- (id)initWithFrame:(CGRect)frame backColor:(UIColor *)backColor progressColor:(UIColor *)progressColor lineWidth:(CGFloat)lineWidth timeinterval:(NSTimeInterval)timeinterval
{
self = [super initWithFrame:frame];
if (self) {
_backColor = backColor;
_progressColor = progressColor;
self.lineWidth = lineWidth;
self.timeinterval = timeinterval;
[self setUP];
}
return self;
}
- (id)initWithCoder:(NSCoder *)aDecoder{
self = [super initWithCoder:aDecoder];
if (self) {
[self setUP];
}
return self;
}
-(void)setUP{
self.backgroundColor = [UIColor clearColor];
_currentTimeinterval = 0;
_isMoving = NO;
self.countLabel.frame = CGRectMake(_lineWidth, self.frame.size.height /2 - 15 , self.frame.size.width - _lineWidth*2, 30);
[self addSubview:self.countLabel];
}
-(LXCountTimer *)timer{
if (!_timer) {
_timer = [[LXCountTimer alloc] init];
}
return _timer;
}
- (NSTimer *)playTimer{
if (!_playTimer) {
_playTimer = [NSTimer scheduledTimerWithTimeInterval:0.01 target:self selector:@selector(payCircular) userInfo:nil repeats:YES];
}
return _playTimer;
}
//label
-(SHineLabel *)countLabel{
if (!_countLabel) {
_countLabel = [[SHineLabel alloc] init];
_countLabel.outLineColor = [UIColor whiteColor];
_countLabel.blurColor = [UIColor whiteColor];
_countLabel.oinsideColor = [UIColor whiteColor];
_countLabel.text = @"00:00";
_countLabel.font = [UIFont fontWithName:GIGA_FONTBOLD size:22];
}
return _countLabel;
}
- (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];
_lineWidth = lineWidth;
[self.layer addSublayer:backgroundLayer];
_progressLayer = [self createRingLayerWithCenter:CGPointMake(CGRectGetWidth(self.frame) / 2, CGRectGetHeight(self.frame) / 2) radius:CGRectGetWidth(self.bounds) / 2 - lineWidth / 2 lineWidth:lineWidth color:self.progressColor];
_progressLayer.strokeEnd = 0;
[self.layer addSublayer:_progressLayer];
//
CGFloat width = self.frame.size.width;
CGFloat height = self.frame.size.height;
CALayer *gradientLayer = [CALayer layer];
gradientLayer.frame = self.bounds;
CAGradientLayer *gradientLayer1 = [CAGradientLayer layer];
gradientLayer1.frame = CGRectMake(0, 0, width, height);
gradientLayer1.colors = @[(__bridge id) [UIColor colorWithRed:151/255.0 green:253/255.0 blue:255/255.0 alpha:1/1.0].CGColor,(__bridge id)[UIColor colorWithRed:165/255.0 green:81/255.0 blue:216/255.0 alpha:1/1.0].CGColor];
//
gradientLayer1.startPoint = CGPointMake(0.5, 0);
gradientLayer1.endPoint = CGPointMake(0.5, 1);
[gradientLayer addSublayer:gradientLayer1];
[self.layer addSublayer:gradientLayer];
gradientLayer.mask = _progressLayer ;
}
- (CAShapeLayer *)createRingLayerWithCenter:(CGPoint)center radius:(CGFloat)radius lineWidth:(CGFloat)lineWidth color:(UIColor *)color {
UIBezierPath *smoothedPath = [UIBezierPath bezierPathWithArcCenter:CGPointMake(radius, radius) radius:radius startAngle:- M_PI_2 endAngle:(M_PI + M_PI_2) clockwise:YES];
CAShapeLayer *slice = [CAShapeLayer layer];
slice.contentsScale = [[UIScreen mainScreen] scale];
slice.frame = CGRectMake(center.x - radius, center.y - radius, radius * 2, radius * 2);
slice.fillColor = [UIColor clearColor].CGColor;
slice.strokeColor = color.CGColor;
slice.lineWidth = lineWidth;
slice.lineCap = kCALineJoinRound;
slice.lineJoin = kCALineJoinBevel;
slice.path = smoothedPath.CGPath;
return slice;
}
- (void)setProgress:(float)progress{
if (progress == 0) {
self.progressLayer.hidden = YES;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
self.progressLayer.strokeEnd = 0;
});
}else {
self.progressLayer.hidden = NO;
self.progressLayer.strokeEnd = progress;
}
}
- (void)updateProgressCircle{
//update progress value
self.progress = (float) (self.currentTimeinterval / self.timeinterval);
if (self.delegate && [self.delegate conformsToProtocol:@protocol(MaskCirCularProGressViewDelegate)]) {
//self.countLabel.text = [NSString stringWithFormat:@"%02ld:%02ld",minute,second];
[self.delegate updateProgressViewWith:self.currentTimeinterval];
}
}
-(void)payCircular{
self.currentTimeinterval += 0.01;
}
- (void)startWith:(NSTimeInterval)time{
self.timeinterval = time;
[self countDown:time];
[self start];
}
-(void)start{
[[NSRunLoop mainRunLoop] addTimer:self.playTimer forMode:NSRunLoopCommonModes];
if (!self.isMoving) {
if (!self.displayLink) {
self.displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(updateProgressCircle)];
[self.displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes];
}else {
self.displayLink.paused = NO;
}
self.isMoving = YES;
}
}
-(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];
}
#pragma mark
-(void)countTimeBegain:(NSUInteger)hour minute:(NSUInteger)minute second:(NSUInteger)second{
long nowTimestamp = [GiGaHelper getNowDateTimestamp];
long futrueTimestamp = [GiGaHelper getFutureTimetstamp:hour minute:minute second:second];
weakify(self);
[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];
if (hour == 0 && minute == 0 && second == 0) {
//
//[self maskTimeEnd];
[self.timer destoryTimer];
[self.playTimer invalidate];
self.playTimer = nil;
[self stop];
if (self.delegate && [self.delegate conformsToProtocol:@protocol(MaskCirCularProGressViewDelegate)]) {
[self.delegate progressDidFish];
}
}
}
-(void)pasuse{
if (self.isMoving) {
self.displayLink.paused = YES;
self.isMoving = NO;
}
}
-(void)stop{
self.isMoving = NO;
self.progress = 0 ;
self.currentTimeinterval = 0;
[self.displayLink invalidate];
self.displayLink = nil;
}
//calculate angle between start to point
- (CGFloat)angleFromStartToPoint:(CGPoint)point{
CGFloat angle = [self angleBetweenLinesWithLine1Start:CGPointMake(CGRectGetWidth(self.bounds) / 2,CGRectGetHeight(self.bounds) / 2)
Line1End:CGPointMake(CGRectGetWidth(self.bounds) / 2,CGRectGetHeight(self.bounds) / 2 - 1)
Line2Start:CGPointMake(CGRectGetWidth(self.bounds) / 2,CGRectGetHeight(self.bounds) / 2)
Line2End:point];
if (CGRectContainsPoint(CGRectMake(0, 0, CGRectGetWidth(self.frame) / 2, CGRectGetHeight(self.frame)), point)) {
angle = 2 * M_PI - angle;
}
return angle;
}
//calculate angle between 2 lines
- (CGFloat)angleBetweenLinesWithLine1Start:(CGPoint)line1Start
Line1End:(CGPoint)line1End
Line2Start:(CGPoint)line2Start
Line2End:(CGPoint)line2End{
CGFloat a = line1End.x - line1Start.x;
CGFloat b = line1End.y - line1Start.y;
CGFloat c = line2End.x - line2Start.x;
CGFloat d = line2End.y - line2Start.y;
return acos(((a * c) + (b * d)) / ((sqrt(a * a + b * b)) * (sqrt(c * c + d * d))));
}
@end

View File

@ -11,5 +11,6 @@
@interface MaskViewBootomWaringView : UIView
@property(nonatomic,strong) GiGaBlockButton *dismissBtn;
-(void)showView;
@end

View File

@ -38,12 +38,13 @@
waringLabel.text = @"亲爱滴,请您务必要开启手机声音哦";
waringLabel.textColor = [UIColor whiteColor];
waringLabel.textAlignment = NSTextAlignmentCenter;
waringLabel.font = [UIFont systemFontOfSize:16];
[waringLabel sizeToFit];
waringLabel.font = [UIFont systemFontOfSize:12];
[self addSubview:waringLabel];
[waringLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(iconImg.mas_right).offset(10);
make.left.mas_equalTo(self.mas_left).offset(40);
make.right.mas_equalTo(self.mas_right).offset(-40);
make.centerY.mas_equalTo(self.mas_centerY);
}];
@ -61,5 +62,20 @@
}];
}
-(void)showView{
[self.dismissBtn initWithBlock:^(UIButton *btn) {
[UIView animateWithDuration:0.4 animations:^{
self.frame = CGRectMake(0, KMainH, KMainW, 60);
} completion:^(BOOL finished) {
[self removeFromSuperview];
}];
} for:UIControlEventTouchUpInside ];
}
@end

View File

@ -12,6 +12,7 @@
#import "GiGaMineInfoViewCell.h"
#import "GiSysSettingsVC.h"
#import "GiMaskTimeHistoryVC.h"
#import "UINavigationBar+Custom.h"
@interface GiGaMeViewController ()
@ -20,8 +21,8 @@
@implementation GiGaMeViewController
- (void)viewDidLoad {
[super viewDidLoad];
[super viewDidLoad];
[self addNavTitile:@"我的"];
// Do any additional setup after loading the view.
[self.view addSubview:self.tableView];

View File

@ -0,0 +1 @@

View File

@ -0,0 +1 @@