This commit is contained in:
lianxiang 2018-10-09 09:02:59 +08:00
parent 431a19b043
commit dc1b1e330f
50 changed files with 880 additions and 255 deletions

View File

@ -17,7 +17,6 @@
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 */; };
8338F6B12142182200B4780B /* MaskTime.png in Resources */ = {isa = PBXBuildFile; fileRef = 8338F6B02142182100B4780B /* MaskTime.png */; };
@ -72,6 +71,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 */; };
835A0EAC216AF03C00ABAB1C /* GiGaPageControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 835A0EAB216AF03C00ABAB1C /* GiGaPageControl.m */; };
835A0EAF216AFDC300ABAB1C /* LXPageControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 835A0EAE216AFDC300ABAB1C /* LXPageControl.m */; };
8361B3CB212155C200238FEB /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8361B3CA212155C200238FEB /* AppDelegate.m */; };
8361B3CE212155C200238FEB /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8361B3CD212155C200238FEB /* ViewController.m */; };
8361B3D1212155C200238FEB /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8361B3CF212155C200238FEB /* Main.storyboard */; };
@ -171,7 +172,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 */; };
@ -279,7 +279,6 @@
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>"; };
@ -374,6 +373,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>"; };
@ -547,7 +550,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>"; };
@ -737,9 +739,7 @@
children = (
8338F6B02142182100B4780B /* MaskTime.png */,
8342D9FC2131150200D16B1D /* 4481.wav */,
838388D92130046D00D14C53 /* emojizone.mp4 */,
838388C3212F934400D14C53 /* pomodoSound.m4a */,
83346AD0212BF5B70054D597 /* useragreement.html */,
);
path = Source;
sourceTree = "<group>";
@ -894,6 +894,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>";
@ -1813,7 +1817,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 */,
@ -1825,7 +1828,6 @@
83346AC1212BB50A0054D597 /* PassWordResetVC.xib 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 */,
@ -1994,6 +1996,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,6 +2032,7 @@
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 */,

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -69,5 +69,10 @@
+(void)savaMaskeTime:(NSTimeInterval)time;
+(NSTimeInterval)getUserMaskeTime;
/**
*/
+(void)saveUserTestFlag:(BOOL)tested;
+(BOOL)isUserTest;
@end

View File

@ -17,6 +17,7 @@ NSString *const kWeiXinUserInfo = @"WeiXinUserinfo";
NSString *const kGiGaToken = @"GiGatoken";
NSString *const kMaskeTime= @"userMaskeTime";
NSString *const kWeiXinCodeInfo = @"WeiXinCodeinfo";
NSString *const kShowUserTested = @"kShowUserTested";
#define MASKTIME_DEFAULT 20;
@implementation GiGaUserDefault
@ -151,4 +152,17 @@ NSString *const kWeiXinCodeInfo = @"WeiXinCodeinfo";
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;
}
@end

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -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.0</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>weixin</string>
@ -62,7 +54,7 @@
<string>是否允许此App使用您的相册</string>
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
<string>App plays audio</string>
<string>remote-notification</string>
</array>
<key>UILaunchStoryboardName</key>

View File

@ -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

View File

@ -122,10 +122,10 @@
</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"/>
<rect key="frame" x="80" y="341" 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="创建账号">
@ -139,9 +139,7 @@
<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 +150,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="95" 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="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"/>
@ -175,7 +175,7 @@
<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="-84.5" y="-2.5"/>
<point key="canvasLocation" x="-85.599999999999994" y="-3.1484257871064472"/>
</view>
</objects>
<resources>

View File

@ -18,6 +18,7 @@
#import "GiGaShareModel.h"
#import "UIImageView+WebCache.h"
#import "UIButton+WebCache.h"
#import "GiGaUserInfoVC.h"
@interface GIGaMaskShareViewController ()<UIImagePickerControllerDelegate,UINavigationControllerDelegate>
@property(nonatomic,strong) GiGaShareModel *model;
@ -51,7 +52,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 +75,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.
@ -213,19 +220,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 +243,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;
}

View File

@ -9,77 +9,200 @@
#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 +211,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];

View File

@ -19,6 +19,8 @@
#import "LXCustomSwith.h"
#import "GiGaUserDefault.h"
#import "GiGaServerConfig.h"
#import "GiGaQuestionVC.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,13 +149,14 @@
- (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) {

View File

@ -35,7 +35,7 @@
#import "GIGaMaskShareViewController.h"
#import "MaskHistryRecord.h"
#import "MaskTimeTopAnimationView.h"
#import <AudioToolbox/AudioToolbox.h>
@interface GiGaMaskTaskViewController ()<MaskCirCularProGressViewDelegate,MaskTimeTextViewDelegate>
{
@ -177,10 +177,20 @@
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;
}
@ -225,11 +235,12 @@
//  app
BOOL showAppGaurd = [GiGaUserDefault isShowedAppGaurd];
if (showAppGaurd == NO) {
[self showAPPappGaurdView];
}
// BOOL showAppGaurd = [GiGaUserDefault isShowedAppGaurd];
// if (showAppGaurd == NO) {
// [self showAPPappGaurdView];
// }
//[self showAPPappGaurdView];
}
@ -463,7 +474,7 @@
NSError *payerError;
NSURL *musicUrl = [[NSURL alloc] initWithString:[[NSBundle mainBundle] pathForResource:@"pomodoSound" ofType:@"m4a"]] ;
AVAudioPlayer *player = [[AVAudioPlayer alloc] initWithContentsOfURL:musicUrl error:&payerError];
player.numberOfLoops = -1;
player.numberOfLoops = 1;//-1
_musicPalyer = player;
[[AVAudioSession sharedInstance] setActive:YES error:nil];
//
@ -483,14 +494,14 @@
}
delegate.isMasking = YES;
[_musicPalyer play];
[self setBackGroundPlayingInfo];//
// [self setBackGroundPlayingInfo];//
// s
NSTimeInterval timeInterVal = [GiGaUserDefault getUserMaskeTime];
[self.cicleProgressView startWith:timeInterVal];
//
[self showWaringView];
//[self showWaringView];
//app showAlert
// [[GiGaLocalNotificationManager localNotifiationCenter] sendLocalNotification:@"本地推送" fireTimeInterval:timeInterVal alertAction:@"测试面膜时间" withIdentifier:kLOCALNotifiID_MASKETIMEEND];
@ -545,8 +556,12 @@
AppDelegate *delegate =(AppDelegate *) [[UIApplication sharedApplication] delegate];
delegate.isMasking = NO;
[_musicPalyer stop];
//
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
//
[self endMaskAnimation];
}
#pragma mark
@ -566,9 +581,13 @@
// [self showAlertGoShareMaskTime];
[self startTest];
}
-(void)startTest{
GiGaQuestionVC *questionVC = [[GiGaQuestionVC alloc] init];
[self.navigationController pushViewController:questionVC animated:YES];
}
-(void)addNotify{
@ -583,7 +602,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,7 +630,7 @@
#pragma mark
-(void)guardViewDissmiss{
[self showWaringView];
//[self showWaringView];
}
@ -620,6 +653,8 @@
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
@ -851,4 +886,5 @@
}
@end

View File

@ -249,19 +249,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];
}
}
}];
}
@ -279,21 +273,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;
}

View File

@ -436,8 +436,7 @@
}];
}
}
//
@ -458,6 +457,8 @@
NSUInteger minute = [mode.minute integerValue];
NSTimeInterval time = minute * 60;
[GiGaUserDefault savaMaskeTime:time];
[GiGaUserDefault saveUserTestFlag:YES];
NC_POST_NAME_OBJECT(@"testfalgUpdate", nil);
//
// NSDictionary *dic = @{

View File

@ -19,6 +19,8 @@
#import "MaskTestNODataViewCell.h"
#import "UIButton+WebCache.h"
#import "UIImageView+WebCache.h"
#import "GiGaUserInfoVC.h"
@interface MaskTestResultVC ()
@property (nonatomic,strong) UIView *tabheader;
@ -139,6 +141,7 @@
[self.navigationController popViewControllerAnimated:YES];
}
}
- (void)viewDidAppear:(BOOL)animated{
[super viewDidAppear:animated];
@ -173,7 +176,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 +199,11 @@
}
}
-(void)goUserInfoView{
GiGaUserInfoVC *userVC= [[GiGaUserInfoVC alloc] init];
[self.navigationController pushViewController:userVC animated:YES];
}
-(void)requstLatestTestData{
[self.view makeToastActivity:CSToastPositionCenter];

View File

@ -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,57 @@
}];
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) {
//se 5s
make.size.mas_equalTo(CGSizeMake(48, 49));
}else{
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(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 +126,7 @@
}
- (void)layoutSubviews{
[super layoutSubviews];
[self drawViewInView:self.colorView backColor:GIGA_MAIN_BGCOLOR];
}

View File

@ -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

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

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

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

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

View File

@ -18,6 +18,7 @@
@property (nonatomic) NSTimeInterval currentTimeinterval;
@property (nonatomic,strong) LXCountTimer *timer;
@property (nonatomic,strong) NSTimer *playTimer;
@property (nonatomic,strong) UIImageView *holderImageView;
@end
@ -48,6 +49,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 +96,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];

View File

@ -407,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;
}

View File

@ -411,21 +411,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 +441,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];
}
}
}];
}