add message exercises

This commit is contained in:
lianxiang 2018-08-23 18:09:15 +08:00
parent 3b8f57d02f
commit d43d7eaaf6
51 changed files with 1713 additions and 122 deletions

View File

@ -57,6 +57,20 @@
8361B4322121832800238FEB /* GiGaBaseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8361B4312121832800238FEB /* GiGaBaseViewController.m */; };
8361B4352121836700238FEB /* GiGaBaseNavViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8361B4342121836700238FEB /* GiGaBaseNavViewController.m */; };
8361B4382121847600238FEB /* UINavigationBar+Custom.m in Sources */ = {isa = PBXBuildFile; fileRef = 8361B4372121847600238FEB /* UINavigationBar+Custom.m */; };
83835BA0212E43BD001480F2 /* GiGaMasssagesVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 83835B9F212E43BD001480F2 /* GiGaMasssagesVC.m */; };
83835BA7212E4748001480F2 /* MAssaageCenterCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 83835BA5212E4748001480F2 /* MAssaageCenterCell.m */; };
83835BA8212E4748001480F2 /* MAssaageCenterCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 83835BA6212E4748001480F2 /* MAssaageCenterCell.xib */; };
83835BAF212E4FCD001480F2 /* MessageListViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 83835BAD212E4FCD001480F2 /* MessageListViewCell.m */; };
83835BB0212E4FCD001480F2 /* MessageListViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 83835BAE212E4FCD001480F2 /* MessageListViewCell.xib */; };
83835BB3212E50ED001480F2 /* ActiveMesagelistVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 83835BB2212E50ED001480F2 /* ActiveMesagelistVC.m */; };
83835BB6212E5174001480F2 /* GiGaServiceViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83835BB5212E5174001480F2 /* GiGaServiceViewController.m */; };
83835BB9212E51B0001480F2 /* GiGaSystemViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83835BB8212E51B0001480F2 /* GiGaSystemViewController.m */; };
83835BBC212E60E5001480F2 /* MessageDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83835BBB212E60E5001480F2 /* MessageDetailViewController.m */; };
83835BC3212E677C001480F2 /* GiGaQuestionVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 83835BC2212E677C001480F2 /* GiGaQuestionVC.m */; };
83835BC7212E7BBF001480F2 /* GiGaNavTitileView.m in Sources */ = {isa = PBXBuildFile; fileRef = 83835BC6212E7BBF001480F2 /* GiGaNavTitileView.m */; };
83835BCA212E8045001480F2 /* GIGAQuetionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 83835BC9212E8045001480F2 /* GIGAQuetionView.m */; };
83835BCD212E856A001480F2 /* NSString+MD5.m in Sources */ = {isa = PBXBuildFile; fileRef = 83835BCC212E856A001480F2 /* NSString+MD5.m */; };
83835BD0212E8B9C001480F2 /* GiGaQuestionModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 83835BCF212E8B9C001480F2 /* GiGaQuestionModel.m */; };
83A2270C212A97ED00B3E75C /* MaskViewBootomWaringView.m in Sources */ = {isa = PBXBuildFile; fileRef = 83A2270B212A97ED00B3E75C /* MaskViewBootomWaringView.m */; };
83A22712212A9EA900B3E75C /* UIView+Sizes.m in Sources */ = {isa = PBXBuildFile; fileRef = 83A22710212A9EA900B3E75C /* UIView+Sizes.m */; };
83A22718212ABDFF00B3E75C /* GiGaBlockButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 83A22717212ABDFF00B3E75C /* GiGaBlockButton.m */; };
@ -169,6 +183,32 @@
8361B4342121836700238FEB /* GiGaBaseNavViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaBaseNavViewController.m; sourceTree = "<group>"; };
8361B4362121847600238FEB /* UINavigationBar+Custom.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UINavigationBar+Custom.h"; sourceTree = "<group>"; };
8361B4372121847600238FEB /* UINavigationBar+Custom.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UINavigationBar+Custom.m"; sourceTree = "<group>"; };
83835B9E212E43BD001480F2 /* GiGaMasssagesVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaMasssagesVC.h; sourceTree = "<group>"; };
83835B9F212E43BD001480F2 /* GiGaMasssagesVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaMasssagesVC.m; sourceTree = "<group>"; };
83835BA4212E4748001480F2 /* MAssaageCenterCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MAssaageCenterCell.h; sourceTree = "<group>"; };
83835BA5212E4748001480F2 /* MAssaageCenterCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MAssaageCenterCell.m; sourceTree = "<group>"; };
83835BA6212E4748001480F2 /* MAssaageCenterCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MAssaageCenterCell.xib; sourceTree = "<group>"; };
83835BAC212E4FCD001480F2 /* MessageListViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MessageListViewCell.h; sourceTree = "<group>"; };
83835BAD212E4FCD001480F2 /* MessageListViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MessageListViewCell.m; sourceTree = "<group>"; };
83835BAE212E4FCD001480F2 /* MessageListViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MessageListViewCell.xib; sourceTree = "<group>"; };
83835BB1212E50ED001480F2 /* ActiveMesagelistVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ActiveMesagelistVC.h; sourceTree = "<group>"; };
83835BB2212E50ED001480F2 /* ActiveMesagelistVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ActiveMesagelistVC.m; sourceTree = "<group>"; };
83835BB4212E5174001480F2 /* GiGaServiceViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaServiceViewController.h; sourceTree = "<group>"; };
83835BB5212E5174001480F2 /* GiGaServiceViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaServiceViewController.m; sourceTree = "<group>"; };
83835BB7212E51B0001480F2 /* GiGaSystemViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaSystemViewController.h; sourceTree = "<group>"; };
83835BB8212E51B0001480F2 /* GiGaSystemViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaSystemViewController.m; sourceTree = "<group>"; };
83835BBA212E60E5001480F2 /* MessageDetailViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MessageDetailViewController.h; sourceTree = "<group>"; };
83835BBB212E60E5001480F2 /* MessageDetailViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MessageDetailViewController.m; sourceTree = "<group>"; };
83835BC1212E677C001480F2 /* GiGaQuestionVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaQuestionVC.h; sourceTree = "<group>"; };
83835BC2212E677C001480F2 /* GiGaQuestionVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaQuestionVC.m; sourceTree = "<group>"; };
83835BC5212E7BBF001480F2 /* GiGaNavTitileView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaNavTitileView.h; sourceTree = "<group>"; };
83835BC6212E7BBF001480F2 /* GiGaNavTitileView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaNavTitileView.m; sourceTree = "<group>"; };
83835BC8212E8045001480F2 /* GIGAQuetionView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GIGAQuetionView.h; sourceTree = "<group>"; };
83835BC9212E8045001480F2 /* GIGAQuetionView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GIGAQuetionView.m; sourceTree = "<group>"; };
83835BCB212E856A001480F2 /* NSString+MD5.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSString+MD5.h"; sourceTree = "<group>"; };
83835BCC212E856A001480F2 /* NSString+MD5.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSString+MD5.m"; sourceTree = "<group>"; };
83835BCE212E8B9C001480F2 /* GiGaQuestionModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaQuestionModel.h; sourceTree = "<group>"; };
83835BCF212E8B9C001480F2 /* GiGaQuestionModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaQuestionModel.m; sourceTree = "<group>"; };
83A2270A212A97ED00B3E75C /* MaskViewBootomWaringView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MaskViewBootomWaringView.h; sourceTree = "<group>"; };
83A2270B212A97ED00B3E75C /* MaskViewBootomWaringView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MaskViewBootomWaringView.m; sourceTree = "<group>"; };
83A22710212A9EA900B3E75C /* UIView+Sizes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+Sizes.m"; sourceTree = "<group>"; };
@ -400,6 +440,7 @@
8361B3FC21215C7400238FEB /* Common */ = {
isa = PBXGroup;
children = (
83835BC4212E7B96001480F2 /* GiGaNavTitileView */,
835060AA212D4C0F007E6220 /* GiGaFileManager */,
83346AC8212BD4160054D597 /* Source */,
8357ADCA2123BFD8000816F2 /* GiGaNetTool */,
@ -431,6 +472,8 @@
8361B4372121847600238FEB /* UINavigationBar+Custom.m */,
83A22716212ABDFF00B3E75C /* GiGaBlockButton.h */,
83A22717212ABDFF00B3E75C /* GiGaBlockButton.m */,
83835BCB212E856A001480F2 /* NSString+MD5.h */,
83835BCC212E856A001480F2 /* NSString+MD5.m */,
);
path = Category;
sourceTree = "<group>";
@ -438,6 +481,7 @@
8361B3FF21215C9D00238FEB /* Modules */ = {
isa = PBXGroup;
children = (
83835B9D212E4335001480F2 /* MessageCenter */,
835060AE212D5423007E6220 /* AppAD */,
83E40B3021219078008149C4 /* Mask */,
83E40B2C21218B7E008149C4 /* LogIn */,
@ -537,6 +581,99 @@
path = BaseVC;
sourceTree = "<group>";
};
83835B9D212E4335001480F2 /* MessageCenter */ = {
isa = PBXGroup;
children = (
83835BA3212E4623001480F2 /* Model */,
83835BA2212E4618001480F2 /* View */,
83835BA1212E4602001480F2 /* Controller */,
);
path = MessageCenter;
sourceTree = "<group>";
};
83835BA1212E4602001480F2 /* Controller */ = {
isa = PBXGroup;
children = (
83835B9E212E43BD001480F2 /* GiGaMasssagesVC.h */,
83835B9F212E43BD001480F2 /* GiGaMasssagesVC.m */,
83835BB1212E50ED001480F2 /* ActiveMesagelistVC.h */,
83835BB2212E50ED001480F2 /* ActiveMesagelistVC.m */,
83835BB4212E5174001480F2 /* GiGaServiceViewController.h */,
83835BB5212E5174001480F2 /* GiGaServiceViewController.m */,
83835BB7212E51B0001480F2 /* GiGaSystemViewController.h */,
83835BB8212E51B0001480F2 /* GiGaSystemViewController.m */,
83835BBA212E60E5001480F2 /* MessageDetailViewController.h */,
83835BBB212E60E5001480F2 /* MessageDetailViewController.m */,
);
path = Controller;
sourceTree = "<group>";
};
83835BA2212E4618001480F2 /* View */ = {
isa = PBXGroup;
children = (
83835BA4212E4748001480F2 /* MAssaageCenterCell.h */,
83835BA5212E4748001480F2 /* MAssaageCenterCell.m */,
83835BA6212E4748001480F2 /* MAssaageCenterCell.xib */,
83835BAC212E4FCD001480F2 /* MessageListViewCell.h */,
83835BAD212E4FCD001480F2 /* MessageListViewCell.m */,
83835BAE212E4FCD001480F2 /* MessageListViewCell.xib */,
);
path = View;
sourceTree = "<group>";
};
83835BA3212E4623001480F2 /* Model */ = {
isa = PBXGroup;
children = (
);
path = Model;
sourceTree = "<group>";
};
83835BBD212E6676001480F2 /* Exercises */ = {
isa = PBXGroup;
children = (
83835BC0212E66A1001480F2 /* View */,
83835BBF212E6698001480F2 /* Model */,
83835BBE212E6690001480F2 /* Controller */,
);
path = Exercises;
sourceTree = "<group>";
};
83835BBE212E6690001480F2 /* Controller */ = {
isa = PBXGroup;
children = (
83835BC1212E677C001480F2 /* GiGaQuestionVC.h */,
83835BC2212E677C001480F2 /* GiGaQuestionVC.m */,
);
path = Controller;
sourceTree = "<group>";
};
83835BBF212E6698001480F2 /* Model */ = {
isa = PBXGroup;
children = (
83835BCE212E8B9C001480F2 /* GiGaQuestionModel.h */,
83835BCF212E8B9C001480F2 /* GiGaQuestionModel.m */,
);
path = Model;
sourceTree = "<group>";
};
83835BC0212E66A1001480F2 /* View */ = {
isa = PBXGroup;
children = (
83835BC8212E8045001480F2 /* GIGAQuetionView.h */,
83835BC9212E8045001480F2 /* GIGAQuetionView.m */,
);
path = View;
sourceTree = "<group>";
};
83835BC4212E7B96001480F2 /* GiGaNavTitileView */ = {
isa = PBXGroup;
children = (
83835BC5212E7BBF001480F2 /* GiGaNavTitileView.h */,
83835BC6212E7BBF001480F2 /* GiGaNavTitileView.m */,
);
path = GiGaNavTitileView;
sourceTree = "<group>";
};
83A22719212AC7FC00B3E75C /* View */ = {
isa = PBXGroup;
children = (
@ -583,6 +720,7 @@
83E40B3021219078008149C4 /* Mask */ = {
isa = PBXGroup;
children = (
83835BBD212E6676001480F2 /* Exercises */,
8354B3832121BB00004F448F /* View */,
8354B3822121BAFA004F448F /* Model */,
8354B3812121BAE1004F448F /* Controller */,
@ -726,8 +864,10 @@
83A22720212AC8C100B3E75C /* GiGaUserLoginVC.xib in Resources */,
83346AC1212BB50A0054D597 /* PassWordResetVC.xib in Resources */,
83346AD1212BF5B70054D597 /* useragreement.html in Resources */,
83835BA8212E4748001480F2 /* MAssaageCenterCell.xib in Resources */,
8361B3D3212155C300238FEB /* Assets.xcassets in Resources */,
8361B3D1212155C200238FEB /* Main.storyboard in Resources */,
83835BB0212E4FCD001480F2 /* MessageListViewCell.xib in Resources */,
83346ACF212BD7830054D597 /* GiGaWebViewController.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
@ -824,31 +964,43 @@
83346AC5212BBC8C0054D597 /* GiGaRegistViewController.m in Sources */,
83346AD7212C18F50054D597 /* GiGaAppGaurdVC.m in Sources */,
8349585C212511040064DB6C /* AppDelegate+ThirdParty.m in Sources */,
83835BCA212E8045001480F2 /* GIGAQuetionView.m in Sources */,
8361B3CE212155C200238FEB /* ViewController.m in Sources */,
8361B4382121847600238FEB /* UINavigationBar+Custom.m in Sources */,
83346AD4212BFF6E0054D597 /* UserGuardViewController.m in Sources */,
8357ADC92123BFCA000816F2 /* GiGaUserManager.m in Sources */,
83835BB3212E50ED001480F2 /* ActiveMesagelistVC.m in Sources */,
83835BC3212E677C001480F2 /* GiGaQuestionVC.m in Sources */,
83A2271F212AC8C100B3E75C /* GiGaUserLoginVC.m in Sources */,
83346ACE212BD7830054D597 /* GiGaWebViewController.m in Sources */,
8357ADD82124027D000816F2 /* GiGaUserDefault.m in Sources */,
83835BB6212E5174001480F2 /* GiGaServiceViewController.m in Sources */,
8361B40721215E6F00238FEB /* GiGaHelper.m in Sources */,
83835BA0212E43BD001480F2 /* GiGaMasssagesVC.m in Sources */,
8357ADCD2123C091000816F2 /* GiGaNetManager.m in Sources */,
835060A9212D38EE007E6220 /* GiGaStartAdView.m in Sources */,
833DA7762122A62000A5C614 /* GiGaMaskTaskViewController.m in Sources */,
8357ADD02123C5F7000816F2 /* GiGaAPIRequest.m in Sources */,
83835BD0212E8B9C001480F2 /* GiGaQuestionModel.m in Sources */,
83835BAF212E4FCD001480F2 /* MessageListViewCell.m in Sources */,
8361B3D9212155C300238FEB /* main.m in Sources */,
835060A2212D1225007E6220 /* GiGaMeViewController.m in Sources */,
8361B3CB212155C200238FEB /* AppDelegate.m in Sources */,
83835BBC212E60E5001480F2 /* MessageDetailViewController.m in Sources */,
83835BCD212E856A001480F2 /* NSString+MD5.m in Sources */,
83835BC7212E7BBF001480F2 /* GiGaNavTitileView.m in Sources */,
8361B4322121832800238FEB /* GiGaBaseViewController.m in Sources */,
8357ADD32123C7C6000816F2 /* GiGaAPIResult.m in Sources */,
8361B4352121836700238FEB /* GiGaBaseNavViewController.m in Sources */,
835060B3212D54C2007E6220 /* GiGaAdDetailViewController.m in Sources */,
83346AC0212BB50A0054D597 /* PassWordResetVC.m in Sources */,
83835BB9212E51B0001480F2 /* GiGaSystemViewController.m in Sources */,
8361B40421215E0C00238FEB /* LXCountTimer.m in Sources */,
8357ADC52123BEBD000816F2 /* GiGaUser.m in Sources */,
83E40B2F21218BA0008149C4 /* GiGaUserViewController.m in Sources */,
835060A5212D3536007E6220 /* AppDelegate+GiGaConfig.m in Sources */,
83E40B2B21218B6F008149C4 /* GiGaExercisesViewController.m in Sources */,
83835BA7212E4748001480F2 /* MAssaageCenterCell.m in Sources */,
8361B42E2121812000238FEB /* GiGaServerConfig.m in Sources */,
83A22712212A9EA900B3E75C /* UIView+Sizes.m in Sources */,
83A22718212ABDFF00B3E75C /* GiGaBlockButton.m in Sources */,

View File

@ -13,6 +13,9 @@
#import "JPUSHService.h"
@interface AppDelegate ()
//
@property (nonatomic,assign) UIBackgroundTaskIdentifier backgroundTask;
@property (nonatomic,strong) NSTimer *timer;
@end
@ -46,9 +49,37 @@
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
//
[self creatBackGoundTask];
}
-(void)creatBackGoundTask{
//app
self.backgroundTask = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:^{
[[UIApplication sharedApplication] endBackgroundTask:self.backgroundTask];
self.backgroundTask = UIBackgroundTaskInvalid;
}];
self.timer = [NSTimer scheduledTimerWithTimeInterval:30.0 target:self selector:@selector(applyToActiveForMoreTime) userInfo:nil repeats:YES];
[self.timer fire];
}
-(void)applyToActiveForMoreTime{
//60 APPactive
if ([UIApplication sharedApplication].backgroundTimeRemaining < 60.0) {
{//60
[[UIApplication sharedApplication] endBackgroundTask:self.backgroundTask];
self.backgroundTask = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:^{
[[UIApplication sharedApplication] endBackgroundTask:self.backgroundTask];
self.backgroundTask = UIBackgroundTaskInvalid;
}];
}
}
}
- (void)applicationWillEnterForeground:(UIApplication *)application {
application.applicationIconBadgeNumber = 0;
[JPUSHService resetBadge];

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -1,12 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
@ -14,11 +13,13 @@
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="rI7-K2-WFe"/>
<viewControllerLayoutGuide type="bottom" id="diS-X4-gLC"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="0.40468725620000001" green="1" blue="0.9282041969" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>

View File

@ -1,20 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" systemVersion="17A277" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="" sceneMemberID="viewController">
<viewController id="BYZ-38-t0r" customClass="ViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="8zS-yh-XjG"/>
<viewControllerLayoutGuide type="bottom" id="okj-lt-jeM"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>

View File

@ -0,0 +1,14 @@
//
// NSString+MD5.h
// GIGA
//
// Created by lianxiang on 2018/8/23.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSString (MD5)
//MD5加密
- (NSString *)MD5;
@end

View File

@ -0,0 +1,30 @@
//
// NSString+MD5.m
// GIGA
//
// Created by lianxiang on 2018/8/23.
// Copyright © 2018 com.giga.ios. All rights reserved.
//
#import "NSString+MD5.h"
#import <CommonCrypto/CommonDigest.h>
@implementation NSString (MD5)
//MD5
- (NSString *)MD5{
const char *ptr = [self UTF8String];
unsigned char md5Buffer[CC_MD5_DIGEST_LENGTH];
CC_MD5(ptr, (unsigned int)strlen(ptr), md5Buffer);
NSMutableString *output = [NSMutableString stringWithCapacity:CC_MD5_DIGEST_LENGTH *2];
for (int i = 0; i<CC_MD5_DIGEST_LENGTH; i++) {
[output appendFormat:@"%02x",md5Buffer[i]];
}
return output;
}
@end

View File

@ -8,22 +8,26 @@
#import <UIKit/UIKit.h>
@interface GiGaBaseViewController : UIViewController<UIGestureRecognizerDelegate,UINavigationControllerDelegate>
@interface GiGaBaseViewController : UIViewController<UITableViewDelegate,UITableViewDataSource>
{
UIView *emptyView;
UIView *_emptyView;
UIView *_noNetWorkView;
}
//- (void)setNavigationViewWithBGColor:(UIColor *)bgColor TitleColor:(UIColor *)titleColor;
//- (void)setNavigationViewHidden:(BOOL)hidden;
//- (void)addBackButtonWithImageName:(NSString *)imageName;
//- (void)setBackButtonHidden:(BOOL)hidden;
//- (void)setNavigationViewBottomLineHidden:(BOOL)hidden;
//
//- (void)addRightButtonWithBGImageName:(NSString *)rightImageName action:(SEL)rightAction;
//
//- (void)addRefreshHeaderFooterForTableView:(UITableView *)tableView
// refreshHeaderSelector:(SEL)refreshHeaderSelector
// refreshFooterSelector:(SEL)refreshFooterSelector;
@property (nonatomic,strong) UIView * emptyView;
@property (nonatomic,strong) UIView * noNetWorkView;
@property (nonatomic,strong) UITableView *tableView;
//网络改变回调Block-1未知、0无网络、1蜂窝数据网络、2WiFi
@property (nonatomic, copy) void(^ network)(AFNetworkReachabilityStatus status);
//当前网络状态,-1未知、0无网络、1蜂窝数据网络、2WiFi
@property (nonatomic, assign) AFNetworkReachabilityStatus currentNetworkStatus;
- (void)showNoNetWorkView;
- (void)showEmptyView;
-(void)addNavTitile:(NSString *)title;
@end

View File

@ -7,6 +7,8 @@
//
#import "GiGaBaseViewController.h"
#import "UIView+Toast.h"
#import "GiGaNavTitileView.h"
@interface GiGaBaseViewController ()
{
@ -15,6 +17,7 @@
// SEL _rightBtnAction;
// SEL _refreshHeaderSelector;
// SEL _refreshFooterSelector;
}
@end
@ -24,21 +27,87 @@
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
[self.view addSubview:_tableView];
[self testNetworkStatus];
}
-(void)addNavTitile:(NSString *)title{
self.navigationItem.titleView = [[GiGaNavTitileView alloc] initWithString:title frame:CGRectMake(0, 0, 200, 44)];
}
//
- (void)showNoNetWorkView
{
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
// if (self.currentNetworkStatus < 1) {
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
//
// });
// }
// });
}
-(void)showEmptyView{
}
-(void)testNetworkStatus{
AFNetworkReachabilityManager *manager = [AFNetworkReachabilityManager sharedManager];
weakify(self);
[manager setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) {
weakSelf.currentNetworkStatus = status;
if (weakSelf.network) weakSelf.network(status);
switch (status) {
case AFNetworkReachabilityStatusNotReachable:
[[UIApplication sharedApplication].keyWindow makeToast:@"哎呀,没有网络啦~"duration:1.6 position:CSToastPositionCenter];
break;
default:
break;
}
}] ;
//
[manager startMonitoring];
}
//
- (void)backWithShowMessage:(NSString *)message afterDelay:(CGFloat)delay
{
[[UIApplication sharedApplication].keyWindow makeToast:message duration:1.6 position:CSToastPositionCenter];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delay * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self back];
});
}
- (void)back
{
[self.navigationController popViewControllerAnimated:YES];
}
-(UITableView*)tableView{
if (!_tableView) {
_tableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStyleGrouped];
}
return _tableView;
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
- (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath {
return 0;
}
*/
- (NSInteger)tableView:(nonnull UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return 0;
}
@end

View File

@ -38,4 +38,8 @@
*/
+(NSString *)stringWithNSTimerinterval:(NSTimeInterval)interval;
//计算文字的长度
+ (CGSize)sizeWithText:(NSString *)text font:(UIFont *)font maxSize:(CGSize)maxSize;
@end

View File

@ -68,5 +68,10 @@
}
//
+ (CGSize)sizeWithText:(NSString *)text font:(UIFont *)font maxSize:(CGSize)maxSize
{
return [text boundingRectWithSize:maxSize options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:font} context:nil].size;
}
@end

View File

@ -0,0 +1,13 @@
//
// GiGaNavTitileView.h
// GIGA
//
// Created by lianxiang on 2018/8/23.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface GiGaNavTitileView : UIView
- (id)initWithString:(NSString *)str frame:(CGRect)frame;
@end

View File

@ -0,0 +1,28 @@
//
// GiGaNavTitileView.m
// GIGA
//
// Created by lianxiang on 2018/8/23.
// Copyright © 2018 com.giga.ios. All rights reserved.
//
#import "GiGaNavTitileView.h"
@implementation GiGaNavTitileView
- (id)initWithString:(NSString *)str frame:(CGRect)frame
{
if (self = [super initWithFrame:frame]) {
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, 44)];
label.textColor = [UIColor redColor];
label.text = str;
label.font = [UIFont boldSystemFontOfSize:18.0f];
label.textAlignment = NSTextAlignmentCenter;
[self addSubview:label];
}
return self;
}
@end

View File

@ -12,6 +12,8 @@
// Include any system framework and library headers here that should be included in all compilation units.
// You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.
#import "GIGA.h"
#import "AFNetworking.h"
#import "UIView+Toast.h"
#ifdef DEBUG
#define GILog(fmt,...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)

View File

@ -29,6 +29,7 @@
</dict>
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
<string>remote-notification</string>
</array>
<key>UILaunchStoryboardName</key>

View File

@ -14,6 +14,7 @@ static NSString *const kAdUrlKey = @"adUrl";
@interface GiGaStartAdView : UIView
@property (nonatomic,strong) UIImageView *adView;
/**
广
*/

View File

@ -16,9 +16,8 @@
@property (nonatomic,strong) NSTimer *countTimer;
@property (nonatomic,assign) int count;
@end
static int const showTime = 12;
static int const showTime = 5;
@implementation GiGaStartAdView
@ -51,7 +50,8 @@ static int const showTime = 12;
[_adView addGestureRecognizer:tap];
CGFloat btnW = 60;
CGFloat btnH = 30;
_countBtn = [[UIButton alloc] initWithFrame:CGRectMake(KMainW - btnW - 24, btnH, btnW, btnH)];
_countBtn = [[UIButton alloc] initWithFrame:CGRectMake(KMainW - btnW - 24, btnH + 10, btnW, btnH)];
[_countBtn addTarget:self action:@selector(removeAdView) forControlEvents:UIControlEventTouchUpInside];
[_countBtn setTitle:[NSString stringWithFormat:@"跳过%d",showTime] forState:UIControlStateNormal];
_countBtn.titleLabel.font = [UIFont systemFontOfSize:15];
@ -76,10 +76,8 @@ static int const showTime = 12;
}
-(void)gotoAd{
[self removeAdView];
NC_POST_NAME_OBJECT(APP_PUSHTO_DETAILVIEW, nil);
}
-(void)countDown{

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
@ -7,7 +7,6 @@
<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>
<objects>
@ -29,7 +28,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="SEO-0F-Irb">
<rect key="frame" x="145" y="75" width="84" height="84"/>
<rect key="frame" x="145" y="55" width="84" height="84"/>
<color key="backgroundColor" red="0.19801172859999999" green="0.55107868019999995" blue="0.17657151269999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="width" constant="84" id="Ac0-Im-dQ0"/>
@ -37,7 +36,7 @@
</constraints>
</imageView>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder=" 请输入手机号" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="uJG-KF-a91">
<rect key="frame" x="36" y="183" width="303" height="40"/>
<rect key="frame" x="36" y="163" width="303" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="HLZ-Al-gsF"/>
</constraints>
@ -46,7 +45,7 @@
<textInputTraits key="textInputTraits"/>
</textField>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="短信验证码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="dR7-iu-Eup">
<rect key="frame" x="36" y="241" width="303" height="40"/>
<rect key="frame" x="36" y="221" width="303" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="kFj-lZ-f1b"/>
</constraints>
@ -55,7 +54,7 @@
<textInputTraits key="textInputTraits"/>
</textField>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="设置登录密码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="UUC-74-fsa">
<rect key="frame" x="36" y="298" width="303" height="40"/>
<rect key="frame" x="36" y="278" width="303" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="ZXN-7M-Ya1"/>
</constraints>
@ -64,28 +63,28 @@
<textInputTraits key="textInputTraits"/>
</textField>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ubQ-Za-dV7">
<rect key="frame" x="36" y="231" width="303" height="1"/>
<rect key="frame" x="36" y="211" width="303" height="1"/>
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="ZnO-2U-V61"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Trq-bz-kQT">
<rect key="frame" x="36" y="289" width="303" height="1"/>
<rect key="frame" x="36" y="269" width="303" height="1"/>
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="VhP-k3-4oj"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Pb5-1e-TXp">
<rect key="frame" x="36" y="346" width="303" height="1"/>
<rect key="frame" x="36" y="326" width="303" height="1"/>
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="p8o-Oo-C9M"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qAH-Fa-AmF">
<rect key="frame" x="242" y="237" width="87" height="48"/>
<rect key="frame" x="242" y="217" width="87" height="48"/>
<constraints>
<constraint firstAttribute="width" constant="87" id="HC3-fN-xKP"/>
<constraint firstAttribute="height" constant="48" id="iQo-1Y-aPA"/>
@ -96,7 +95,7 @@
</state>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="b06-w9-r2g">
<rect key="frame" x="36" y="373" width="33" height="27"/>
<rect key="frame" x="36" y="353" width="33" height="27"/>
<color key="backgroundColor" red="0.19801172859999999" green="0.55107868019999995" blue="0.17657151269999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="27" id="TwO-WB-jNy"/>
@ -104,7 +103,7 @@
</constraints>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hZA-nj-Wmu">
<rect key="frame" x="36" y="434" width="303" height="48"/>
<rect key="frame" x="36" y="414" width="303" height="48"/>
<color key="backgroundColor" red="0.19801172859999999" green="0.55107868019999995" blue="0.17657151269999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="48" id="1ii-ua-NM2"/>
@ -112,7 +111,7 @@
<state key="normal" title="注 册"/>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Vxb-TL-wDd" customClass="TTTAttributedLabel">
<rect key="frame" x="77" y="376" width="42" height="21"/>
<rect key="frame" x="77" y="356" width="42" height="21"/>
<fontDescription key="fontDescription" name=".AppleSystemUIFont" family=".AppleSystemUIFont" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
@ -120,37 +119,36 @@
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="uJG-KF-a91" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="3lK-sI-SIL"/>
<constraint firstItem="uJG-KF-a91" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="3lK-sI-SIL"/>
<constraint firstItem="qAH-Fa-AmF" firstAttribute="leading" secondItem="dR7-iu-Eup" secondAttribute="trailing" constant="-97" id="68S-uL-NWf"/>
<constraint firstItem="hZA-nj-Wmu" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="8oy-SI-wjc"/>
<constraint firstItem="hZA-nj-Wmu" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="8oy-SI-wjc"/>
<constraint firstItem="uJG-KF-a91" firstAttribute="top" secondItem="SEO-0F-Irb" secondAttribute="bottom" constant="24" id="9KB-zh-0Iv"/>
<constraint firstItem="UUC-74-fsa" firstAttribute="width" secondItem="uJG-KF-a91" secondAttribute="width" id="AxW-2N-oD9"/>
<constraint firstItem="b06-w9-r2g" firstAttribute="leading" secondItem="Pb5-1e-TXp" secondAttribute="leading" id="BTF-Y0-iHe"/>
<constraint firstItem="Vxb-TL-wDd" firstAttribute="leading" secondItem="b06-w9-r2g" secondAttribute="trailing" constant="8" id="Dc3-Gz-cl5"/>
<constraint firstItem="Pb5-1e-TXp" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="ETi-1w-mRx"/>
<constraint firstItem="Pb5-1e-TXp" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="ETi-1w-mRx"/>
<constraint firstItem="qAH-Fa-AmF" firstAttribute="centerY" secondItem="dR7-iu-Eup" secondAttribute="centerY" id="G6I-E3-lox"/>
<constraint firstItem="Trq-bz-kQT" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="GsV-nH-ZTs"/>
<constraint firstItem="SEO-0F-Irb" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="HKT-sW-HzQ"/>
<constraint firstItem="Trq-bz-kQT" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="GsV-nH-ZTs"/>
<constraint firstItem="SEO-0F-Irb" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="HKT-sW-HzQ"/>
<constraint firstItem="Vxb-TL-wDd" firstAttribute="centerY" secondItem="b06-w9-r2g" secondAttribute="centerY" id="M1g-x2-bC1"/>
<constraint firstItem="ubQ-Za-dV7" firstAttribute="top" secondItem="uJG-KF-a91" secondAttribute="bottom" constant="8" id="QhR-31-HPa"/>
<constraint firstItem="Pb5-1e-TXp" firstAttribute="width" secondItem="UUC-74-fsa" secondAttribute="width" id="Sd7-d5-Uht"/>
<constraint firstItem="Trq-bz-kQT" firstAttribute="top" secondItem="dR7-iu-Eup" secondAttribute="bottom" constant="8" id="WSq-Ss-0Ac"/>
<constraint firstItem="SEO-0F-Irb" firstAttribute="top" secondItem="Q5M-cg-NOt" secondAttribute="top" constant="55" id="Xk1-QJ-vEV"/>
<constraint firstItem="uJG-KF-a91" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" constant="36" id="cUx-ne-9fl"/>
<constraint firstItem="SEO-0F-Irb" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" constant="55" id="Xk1-QJ-vEV"/>
<constraint firstItem="uJG-KF-a91" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="36" id="cUx-ne-9fl"/>
<constraint firstItem="dR7-iu-Eup" firstAttribute="top" secondItem="ubQ-Za-dV7" secondAttribute="bottom" constant="9" id="cnf-kX-9T5"/>
<constraint firstItem="dR7-iu-Eup" firstAttribute="width" secondItem="uJG-KF-a91" secondAttribute="width" id="d0L-Yy-an6"/>
<constraint firstItem="dR7-iu-Eup" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="fDj-om-PCx"/>
<constraint firstItem="ubQ-Za-dV7" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="fcn-EO-FSA"/>
<constraint firstItem="dR7-iu-Eup" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="fDj-om-PCx"/>
<constraint firstItem="ubQ-Za-dV7" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="fcn-EO-FSA"/>
<constraint firstItem="b06-w9-r2g" firstAttribute="top" secondItem="Pb5-1e-TXp" secondAttribute="bottom" constant="26" id="kHK-na-vql"/>
<constraint firstItem="hZA-nj-Wmu" firstAttribute="leading" secondItem="b06-w9-r2g" secondAttribute="leading" id="nSQ-58-vgR"/>
<constraint firstItem="UUC-74-fsa" firstAttribute="top" secondItem="Trq-bz-kQT" secondAttribute="bottom" constant="8" id="pft-bZ-H5z"/>
<constraint firstItem="UUC-74-fsa" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="pth-LZ-Cdm"/>
<constraint firstItem="UUC-74-fsa" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="pth-LZ-Cdm"/>
<constraint firstItem="ubQ-Za-dV7" firstAttribute="width" secondItem="uJG-KF-a91" secondAttribute="width" id="sAe-4S-EEP"/>
<constraint firstItem="Pb5-1e-TXp" firstAttribute="top" secondItem="UUC-74-fsa" secondAttribute="bottom" constant="8" id="trq-E6-Qag"/>
<constraint firstItem="Trq-bz-kQT" firstAttribute="width" secondItem="dR7-iu-Eup" secondAttribute="width" id="xA0-yc-8lb"/>
<constraint firstItem="hZA-nj-Wmu" firstAttribute="top" secondItem="b06-w9-r2g" secondAttribute="bottom" constant="34" id="xPR-Yh-hFk"/>
</constraints>
<viewLayoutGuide key="safeArea" id="Q5M-cg-NOt"/>
<point key="canvasLocation" x="33.5" y="53.5"/>
</view>
</objects>

View File

@ -112,7 +112,7 @@
#pragma mark -
-(void)loginBtnAction:(UIButton *)btn{
[GiGaUserDefault saveUserId:@"123"];
[self dismissViewControllerAnimated:YES completion:nil];
}
@end

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
@ -7,7 +7,6 @@
<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>
<objects>
@ -28,7 +27,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="RIl-8E-GcR">
<rect key="frame" x="137" y="64" width="100" height="100"/>
<rect key="frame" x="137" y="44" width="100" height="100"/>
<color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="width" secondItem="RIl-8E-GcR" secondAttribute="height" multiplier="1:1" id="kf7-fa-NKy"/>
@ -36,7 +35,7 @@
</constraints>
</imageView>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="账号" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Yiv-h8-4V1">
<rect key="frame" x="32" y="180" width="309" height="30"/>
<rect key="frame" x="32" y="160" width="309" height="30"/>
<color key="backgroundColor" red="0.99607843139999996" green="0.94117647059999998" blue="0.69803921570000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="LOI-yC-v4S"/>
@ -46,7 +45,7 @@
<textInputTraits key="textInputTraits"/>
</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="33" y="244" width="309" height="30"/>
<rect key="frame" x="33" y="224" width="309" height="30"/>
<color key="backgroundColor" red="0.99607843139999996" green="0.94117647059999998" blue="0.69803921570000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="eG3-4a-G4H"/>
@ -56,21 +55,21 @@
<textInputTraits key="textInputTraits"/>
</textField>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qzA-vE-CGR">
<rect key="frame" x="33" y="214" width="309" height="1"/>
<rect key="frame" x="33" y="194" width="309" height="1"/>
<color key="backgroundColor" red="0.74901960779999999" green="0.74509803919999995" blue="0.74509803919999995" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="Nz8-a3-phJ"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZJU-Uo-5TM">
<rect key="frame" x="33.5" y="279" width="309" height="1"/>
<rect key="frame" x="33.5" y="259" width="309" height="1"/>
<color key="backgroundColor" red="0.74901960779999999" green="0.74509803919999995" blue="0.74509803919999995" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="NqZ-5s-7Mg"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="chq-bd-6sQ">
<rect key="frame" x="281" y="295" width="60" height="30"/>
<rect key="frame" x="281" y="275" width="60" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="3Nq-gh-4BK"/>
<constraint firstAttribute="width" constant="60" id="Pv8-8w-ASz"/>
@ -84,7 +83,7 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8Of-JP-gMR">
<rect key="frame" x="33" y="357" width="309" height="42"/>
<rect key="frame" x="33" y="337" width="309" height="42"/>
<color key="backgroundColor" red="0.19801172859999999" green="0.55107868019999995" blue="0.17657151269999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="42" id="0l3-lV-ZMK"/>
@ -95,7 +94,7 @@
</state>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="F5p-cf-frr">
<rect key="frame" x="144" y="419" width="87" height="30"/>
<rect key="frame" x="144" y="399" width="87" height="30"/>
<constraints>
<constraint firstAttribute="width" constant="87" id="7xs-hL-39d"/>
<constraint firstAttribute="height" constant="30" id="Q2v-So-LQo"/>
@ -103,21 +102,21 @@
<state key="normal" title="创建账号"/>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Qbr-kJ-U7P">
<rect key="frame" x="33" y="510" width="129" height="1"/>
<rect key="frame" x="33" y="490" width="129" height="1"/>
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="95X-YC-qXA"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mxE-Tx-0Us">
<rect key="frame" x="220" y="510" width="122" height="1"/>
<rect key="frame" x="220" y="490" width="122" height="1"/>
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="bG5-pf-mm7"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="OR" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5Zl-ot-dVW">
<rect key="frame" x="175.5" y="500" width="24" height="21"/>
<rect key="frame" x="175.5" y="480" width="24" height="21"/>
<constraints>
<constraint firstAttribute="width" constant="24" id="2XR-pF-nnJ"/>
<constraint firstAttribute="height" constant="21" id="bg5-RC-uB6"/>
@ -127,7 +126,7 @@
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="dnL-WV-spY">
<rect key="frame" x="33" y="535" width="309" height="50"/>
<rect key="frame" x="33" y="515" width="309" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="rYQ-VZ-BLB"/>
</constraints>
@ -136,39 +135,38 @@
</subviews>
<constraints>
<constraint firstItem="mxE-Tx-0Us" firstAttribute="centerY" secondItem="5Zl-ot-dVW" secondAttribute="centerY" id="3cA-BV-qmd"/>
<constraint firstItem="RIl-8E-GcR" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="4eY-sT-DtU"/>
<constraint firstItem="RIl-8E-GcR" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="4eY-sT-DtU"/>
<constraint firstItem="dnL-WV-spY" firstAttribute="top" secondItem="5Zl-ot-dVW" secondAttribute="bottom" constant="14" id="65m-zQ-bWl"/>
<constraint firstItem="RIl-8E-GcR" firstAttribute="top" secondItem="Q5M-cg-NOt" secondAttribute="top" constant="44" id="6CN-xC-x9g"/>
<constraint firstItem="RIl-8E-GcR" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" constant="44" id="6CN-xC-x9g"/>
<constraint firstItem="5Zl-ot-dVW" firstAttribute="leading" secondItem="Qbr-kJ-U7P" secondAttribute="trailing" constant="13.5" id="7Lh-zH-OQP"/>
<constraint firstItem="ZJU-Uo-5TM" firstAttribute="width" secondItem="Y1I-OE-6t1" secondAttribute="width" id="7og-vA-Mtc"/>
<constraint firstItem="chq-bd-6sQ" firstAttribute="top" secondItem="ZJU-Uo-5TM" secondAttribute="bottom" constant="15" id="7th-F3-6VD"/>
<constraint firstItem="Qbr-kJ-U7P" firstAttribute="leading" secondItem="8Of-JP-gMR" secondAttribute="leading" id="ANZ-UH-EG0"/>
<constraint firstItem="8Of-JP-gMR" firstAttribute="width" secondItem="Yiv-h8-4V1" secondAttribute="width" id="EiB-Tt-lhg"/>
<constraint firstItem="Q5M-cg-NOt" firstAttribute="trailing" secondItem="chq-bd-6sQ" secondAttribute="trailing" constant="34" id="FIt-sy-fp4"/>
<constraint firstAttribute="trailing" secondItem="chq-bd-6sQ" secondAttribute="trailing" constant="34" id="FIt-sy-fp4"/>
<constraint firstItem="8Of-JP-gMR" firstAttribute="top" secondItem="chq-bd-6sQ" secondAttribute="bottom" constant="32" id="I92-Z4-DAA"/>
<constraint firstItem="5Zl-ot-dVW" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="LX6-0I-g2t"/>
<constraint firstItem="dnL-WV-spY" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="Lpn-U1-2EJ"/>
<constraint firstItem="5Zl-ot-dVW" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="LX6-0I-g2t"/>
<constraint firstItem="dnL-WV-spY" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="Lpn-U1-2EJ"/>
<constraint firstItem="ZJU-Uo-5TM" firstAttribute="top" secondItem="Y1I-OE-6t1" secondAttribute="bottom" constant="5" id="O7c-yh-TU1"/>
<constraint firstItem="Y1I-OE-6t1" firstAttribute="width" secondItem="Yiv-h8-4V1" secondAttribute="width" id="Po4-UD-7zT"/>
<constraint firstItem="Yiv-h8-4V1" firstAttribute="top" secondItem="RIl-8E-GcR" secondAttribute="bottom" constant="16" id="PoW-PW-M0w"/>
<constraint firstItem="Yiv-h8-4V1" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" constant="-1" id="RNt-vj-zPW"/>
<constraint firstItem="Yiv-h8-4V1" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" constant="-1" id="RNt-vj-zPW"/>
<constraint firstItem="5Zl-ot-dVW" firstAttribute="top" secondItem="F5p-cf-frr" secondAttribute="bottom" constant="51" id="TfU-BV-iUe"/>
<constraint firstItem="Yiv-h8-4V1" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" constant="32" id="Ux4-8Q-gMv"/>
<constraint firstItem="ZJU-Uo-5TM" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="V04-2u-unZ"/>
<constraint firstItem="Yiv-h8-4V1" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="32" id="Ux4-8Q-gMv"/>
<constraint firstItem="ZJU-Uo-5TM" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="V04-2u-unZ"/>
<constraint firstItem="mxE-Tx-0Us" firstAttribute="leading" secondItem="5Zl-ot-dVW" secondAttribute="trailing" constant="20.5" id="VOs-rR-tew"/>
<constraint firstItem="qzA-vE-CGR" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="WN4-SB-6Dy"/>
<constraint firstItem="qzA-vE-CGR" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="WN4-SB-6Dy"/>
<constraint firstItem="mxE-Tx-0Us" firstAttribute="trailing" secondItem="8Of-JP-gMR" secondAttribute="trailing" id="aZs-4P-9iv"/>
<constraint firstItem="dnL-WV-spY" firstAttribute="width" secondItem="8Of-JP-gMR" secondAttribute="width" id="asA-dV-Wmj"/>
<constraint firstItem="Y1I-OE-6t1" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="c3z-29-UwW"/>
<constraint firstItem="Y1I-OE-6t1" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="c3z-29-UwW"/>
<constraint firstItem="Qbr-kJ-U7P" firstAttribute="centerY" secondItem="5Zl-ot-dVW" secondAttribute="centerY" id="d9i-fK-2UN"/>
<constraint firstItem="qzA-vE-CGR" firstAttribute="top" secondItem="Yiv-h8-4V1" secondAttribute="bottom" constant="4" id="e5U-rz-XHX"/>
<constraint firstItem="F5p-cf-frr" firstAttribute="top" secondItem="8Of-JP-gMR" secondAttribute="bottom" constant="20" id="fJY-wF-KYT"/>
<constraint firstItem="8Of-JP-gMR" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="pOm-hg-pge"/>
<constraint firstItem="8Of-JP-gMR" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="pOm-hg-pge"/>
<constraint firstItem="Y1I-OE-6t1" firstAttribute="top" secondItem="qzA-vE-CGR" secondAttribute="bottom" constant="29" id="tBz-sj-jET"/>
<constraint firstItem="F5p-cf-frr" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="uNF-sL-Kjk"/>
<constraint firstItem="F5p-cf-frr" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="uNF-sL-Kjk"/>
<constraint firstItem="qzA-vE-CGR" firstAttribute="width" secondItem="Yiv-h8-4V1" secondAttribute="width" id="ukd-Wg-7Qy"/>
</constraints>
<viewLayoutGuide key="safeArea" id="Q5M-cg-NOt"/>
<point key="canvasLocation" x="33.5" y="53.5"/>
</view>
</objects>

View File

@ -1,12 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@ -22,18 +21,17 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<webView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sjU-k1-sKC">
<rect key="frame" x="0.0" y="20" width="375" height="627"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="647"/>
<color key="backgroundColor" red="0.36078431370000003" green="0.38823529410000002" blue="0.4039215686" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</webView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="sjU-k1-sKC" firstAttribute="top" secondItem="Q5M-cg-NOt" secondAttribute="top" id="4TK-3i-ZCu"/>
<constraint firstItem="sjU-k1-sKC" firstAttribute="bottom" secondItem="Q5M-cg-NOt" secondAttribute="bottom" constant="-20" id="7ku-Eb-39H"/>
<constraint firstItem="sjU-k1-sKC" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="RaA-Zb-VXm"/>
<constraint firstAttribute="trailing" secondItem="sjU-k1-sKC" secondAttribute="trailing" id="cjE-bV-s6d"/>
<constraint firstItem="sjU-k1-sKC" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="1H8-sC-8Mx"/>
<constraint firstAttribute="bottom" secondItem="sjU-k1-sKC" secondAttribute="bottom" constant="20" id="6Nb-OM-pgQ"/>
<constraint firstItem="sjU-k1-sKC" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="Hu9-3C-rEq"/>
<constraint firstAttribute="trailing" secondItem="sjU-k1-sKC" secondAttribute="trailing" id="Ray-xd-2vY"/>
</constraints>
<viewLayoutGuide key="safeArea" id="Q5M-cg-NOt"/>
<point key="canvasLocation" x="33.5" y="53.5"/>
</view>
</objects>

View File

@ -1,12 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@ -26,7 +25,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="输入手机号" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="gY9-PP-yev">
<rect key="frame" x="43" y="117" width="289" height="40"/>
<rect key="frame" x="43" y="97" width="289" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="yoq-8B-w5c"/>
</constraints>
@ -35,14 +34,14 @@
<textInputTraits key="textInputTraits"/>
</textField>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="eTv-jk-ONL">
<rect key="frame" x="43" y="165" width="289" height="1"/>
<rect key="frame" x="43" y="145" width="289" height="1"/>
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="dNM-XE-6RY"/>
</constraints>
</view>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="短信验证码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="nCj-Hg-8pQ">
<rect key="frame" x="43" y="193" width="289" height="40"/>
<rect key="frame" x="43" y="173" width="289" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="ioe-Op-8gQ"/>
</constraints>
@ -51,21 +50,21 @@
<textInputTraits key="textInputTraits"/>
</textField>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rno-VM-u1V">
<rect key="frame" x="43" y="241" width="289" height="1"/>
<rect key="frame" x="43" y="221" width="289" height="1"/>
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="2Xf-HW-K8d"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rm0-UH-T6r">
<rect key="frame" x="43" y="305" width="289" height="1"/>
<rect key="frame" x="43" y="285" width="289" height="1"/>
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="eFI-tx-VRV"/>
</constraints>
</view>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="输入新的登录密码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="MHD-nb-UXj">
<rect key="frame" x="43" y="257" width="289" height="40"/>
<rect key="frame" x="43" y="237" width="289" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="W7U-Rm-Rvm"/>
</constraints>
@ -74,7 +73,7 @@
<textInputTraits key="textInputTraits"/>
</textField>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Dv2-ja-F8y">
<rect key="frame" x="238" y="189" width="94" height="48"/>
<rect key="frame" x="238" y="169" width="94" height="48"/>
<constraints>
<constraint firstAttribute="width" constant="94" id="FpG-3G-Wne"/>
<constraint firstAttribute="height" constant="48" id="LDX-cC-LYa"/>
@ -85,7 +84,7 @@
</state>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="w3j-WU-gmW">
<rect key="frame" x="43" y="363" width="289" height="44"/>
<rect key="frame" x="43" y="343" width="289" height="44"/>
<color key="backgroundColor" red="0.19801172859999999" green="0.55107868019999995" blue="0.17657151269999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="rMD-6U-hj0"/>
@ -103,26 +102,25 @@
<constraint firstItem="rno-VM-u1V" firstAttribute="width" secondItem="nCj-Hg-8pQ" secondAttribute="width" id="CMx-ZE-SCl"/>
<constraint firstItem="Dv2-ja-F8y" firstAttribute="trailing" secondItem="nCj-Hg-8pQ" secondAttribute="trailing" id="ELP-ab-bxy"/>
<constraint firstItem="eTv-jk-ONL" firstAttribute="width" secondItem="gY9-PP-yev" secondAttribute="width" id="FJo-eR-4IW"/>
<constraint firstItem="nCj-Hg-8pQ" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="Ip3-fu-Ab5"/>
<constraint firstItem="nCj-Hg-8pQ" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="Ip3-fu-Ab5"/>
<constraint firstItem="rno-VM-u1V" firstAttribute="top" secondItem="nCj-Hg-8pQ" secondAttribute="bottom" constant="8" id="JT0-3X-s12"/>
<constraint firstItem="rm0-UH-T6r" firstAttribute="top" secondItem="MHD-nb-UXj" secondAttribute="bottom" constant="8" id="Lab-21-Am5"/>
<constraint firstItem="gY9-PP-yev" firstAttribute="top" secondItem="Q5M-cg-NOt" secondAttribute="top" constant="97" id="N5z-r9-plE"/>
<constraint firstItem="gY9-PP-yev" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" constant="97" id="N5z-r9-plE"/>
<constraint firstItem="eTv-jk-ONL" firstAttribute="top" secondItem="gY9-PP-yev" secondAttribute="bottom" constant="8" id="Pyp-bG-ANr"/>
<constraint firstItem="MHD-nb-UXj" firstAttribute="top" secondItem="rno-VM-u1V" secondAttribute="bottom" constant="15" id="Upp-s9-MAJ"/>
<constraint firstItem="MHD-nb-UXj" firstAttribute="width" secondItem="nCj-Hg-8pQ" secondAttribute="width" id="Z1W-dz-bRy"/>
<constraint firstItem="gY9-PP-yev" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" constant="43" id="bPv-7M-n3u"/>
<constraint firstItem="rno-VM-u1V" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="bu8-ma-nFV"/>
<constraint firstItem="rm0-UH-T6r" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="ciw-0d-uLr"/>
<constraint firstItem="gY9-PP-yev" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="43" id="bPv-7M-n3u"/>
<constraint firstItem="rno-VM-u1V" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="bu8-ma-nFV"/>
<constraint firstItem="rm0-UH-T6r" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="ciw-0d-uLr"/>
<constraint firstItem="rm0-UH-T6r" firstAttribute="width" secondItem="MHD-nb-UXj" secondAttribute="width" id="cjR-SV-mNL"/>
<constraint firstItem="w3j-WU-gmW" firstAttribute="width" secondItem="MHD-nb-UXj" secondAttribute="width" id="f9d-va-eRT"/>
<constraint firstItem="w3j-WU-gmW" firstAttribute="top" secondItem="rm0-UH-T6r" secondAttribute="bottom" constant="57" id="hD7-Dt-DAs"/>
<constraint firstItem="eTv-jk-ONL" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="j3f-mJ-dgC"/>
<constraint firstItem="gY9-PP-yev" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="nQx-N0-rE4"/>
<constraint firstItem="w3j-WU-gmW" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="oDc-Cu-4pY"/>
<constraint firstItem="eTv-jk-ONL" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="j3f-mJ-dgC"/>
<constraint firstItem="gY9-PP-yev" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="nQx-N0-rE4"/>
<constraint firstItem="w3j-WU-gmW" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="oDc-Cu-4pY"/>
<constraint firstItem="Dv2-ja-F8y" firstAttribute="centerY" secondItem="nCj-Hg-8pQ" secondAttribute="centerY" id="oxc-Vq-ekG"/>
<constraint firstItem="MHD-nb-UXj" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="sag-zh-3M2"/>
<constraint firstItem="MHD-nb-UXj" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="sag-zh-3M2"/>
</constraints>
<viewLayoutGuide key="safeArea" id="Q5M-cg-NOt"/>
<point key="canvasLocation" x="33.5" y="53.5"/>
</view>
</objects>

View File

@ -15,6 +15,9 @@
#import "UIView+Toast.h"
#import "GiGaMeViewController.h"
#import "GiGaAdDetailViewController.h"
#import "GiGaMasssagesVC.h"
#import "Masonry.h"
#import "GiGaQuestionVC.h"
@interface GiGaMaskTaskViewController ()
@property(nonatomic,strong)MaskViewBootomWaringView *waringView;
@ -26,12 +29,46 @@
[super viewDidLoad];
// Do any additional setup after loading the view.
[self setUpNav];
[self initUI];
[self addNotify];
BOOL canshowGaurd = [GiGaUserDefault isShowedGaurd];
if (!canshowGaurd) {
NSLog(@"%d",(int)canshowGaurd );
}
-(void)initUI{
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(-200);
}];
}
#pragma mark
-(void)testBtnAcion:(UIButton *)btn{
BOOL isUserLogin = [GiGaUserDefault isUserLogin];
if (isUserLogin) {
//GIGA_ShowToast(@"userLogin!");
GiGaQuestionVC *questionVC = [[GiGaQuestionVC alloc] init];
[self.navigationController pushViewController:questionVC animated:YES];
}else{
GiGaUserLoginVC *userlogInVC= [[GiGaUserLoginVC alloc] init];
GiGaBaseNavViewController *baseNav = [[GiGaBaseNavViewController alloc] initWithRootViewController:userlogInVC];
[self presentViewController:baseNav animated:YES completion:nil];
}
// NSLog(@"%d",(int)canshowGaurd );
}
-(void)viewDidAppear:(BOOL)animated{
@ -58,10 +95,12 @@
[self.navigationController pushViewController:detailVC animated:YES];
}
#pragma mark
-(void)guardViewDissmiss{
[self showWaringView];
}
#pragma mark app
-(void)appGauardViewDissmiss{
//
@ -71,6 +110,7 @@
[self showUserGaurdView];
}
}
-(void)dealloc{
NC_REMOVE_NAME(self, USER_GUARD_DISSMISS, nil);
@ -120,9 +160,11 @@
-(void)leftBtnAction{
BOOL isUserLogin = [GiGaUserDefault isUserLogin];
if (isUserLogin) {
GIGA_ShowToast(@"userLogin!");
GiGaMasssagesVC *masageVC= [[GiGaMasssagesVC alloc] init];
[self.navigationController pushViewController:masageVC animated:YES];
}else{
GiGaUserLoginVC *userlogInVC= [[GiGaUserLoginVC alloc] init];
GiGaBaseNavViewController *baseNav = [[GiGaBaseNavViewController alloc] initWithRootViewController:userlogInVC];

View File

@ -0,0 +1,14 @@
//
// GiGaQuestionVC.h
// GIGA
//
// Created by lianxiang on 2018/8/23.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import "GiGaBaseViewController.h"
@interface GiGaQuestionVC : GiGaBaseViewController
@end

View File

@ -0,0 +1,189 @@
//
// GiGaQuestionVC.m
// GIGA
//
// Created by lianxiang on 2018/8/23.
// Copyright © 2018 com.giga.ios. All rights reserved.
//
#import "GiGaQuestionVC.h"
#import "GIGAQuetionView.h"
#import "GiGaQuestionModel.h"
#import "Masonry.h"
@interface GiGaQuestionVC ()
@property (nonatomic,weak) GIGAQuetionView *questionView;
@property (nonatomic,assign) NSInteger page;
@property (nonatomic,strong) NSMutableArray *questonArray;
@property (nonatomic,strong) GiGaQuestionModel *currentModel;
@property (nonatomic,strong) UILabel *questionlabel;
@property (nonatomic,strong) UIButton *nextBtn;
@end
@implementation GiGaQuestionVC
- (void)viewDidLoad {
[self addNavTitile:@"测试肤质"];
[super viewDidLoad];
// self.title = @"测试肤质";
_page = 1;
//
[self initControls];
[self setquestionArray];
[self getQuestionsInfo];
}
-(NSMutableArray *)questonArray{
if (!_questonArray) {
_questonArray = [[NSMutableArray alloc] init];
}
return _questonArray;
}
-(void)setquestionArray{
NSArray *array = @[
@{@"questionid" : @"1", @"totalCount" : @"5", @"question" : @"如果昨天是明天的话就好了,这样今天就周五了。真实的今天可能是星期几?", @"questiontype" : @"1", @"questiontype_text" : @"单选题", @"questionselectnumber" : @"3", @"questiondescribe" : @"星期三:理想今天是星期五,昨天是星期四,真实明天是理想的昨天是星期四,真实的今天是星期三。\n星期日理想今天是星期五明天是星期六真实昨天是理想的明天是星期六真实的今天是星期日。", @"trueanswer" : @"A", @"userAnswer" : @[], @"tkselect" : @[@"A星期三", @"B星期四", @"C星期五"]},
@{@"questionid" : @"2", @"totalCount" : @"5", @"question" : @"这里是问题这道题的答案是AC。这里是问题这道题的答案是AC。这里是问题这道题的答案是AC。", @"questiontype" : @"1", @"questiontype_text" : @"多选题", @"questionselectnumber" : @"5", @"questiondescribe" : @"这里是答案解析,这里可以很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长的。", @"trueanswer" : @"AC", @"userAnswer" : @[], @"tkselect" : @[@"A这个选项是正确的。这个选项是正确的。这个选项是正确的。", @"B这个选项是错误的。这个选项是错误的。这个选项是错误的。", @"C这个选项是正确的。这个选项是正确的。这个选项是正确的。", @"D这个选项是错误的。这个选项是错误的。这个选项是错误的。", @"E这个选项是错误的。这个选项是错误的。这个选项是错误的。"]},
@{@"questionid" : @"3", @"totalCount" : @"5", @"question" : @"以下哪个牌子不是化妆品?", @"questiontype" : @"1", @"questiontype_text" : @"单选题", @"questionselectnumber" : @"3", @"questiondescribe" : @"化妆品,化妆品化妆品化妆品化妆品化妆品化妆品化妆品。", @"trueanswer" : @"A", @"userAnswer" : @[], @"tkselect" : @[@"A化妆品", @"B化妆品", @"C星期五"]},
@{@"questionid" : @"4", @"totalCount" : @"5", @"question" : @"如果昨天是明天的话就好了,这样今天就周五了。真实的今天可能是星期几?", @"questiontype" : @"1", @"questiontype_text" : @"单选题", @"questionselectnumber" : @"3", @"questiondescribe" : @"真实昨天是理想的明天是星期六,真实的今天是星期日?", @"trueanswer" : @"A", @"userAnswer" : @[], @"tkselect" : @[@"A星三", @"B星", @"C期"]},
@{@"questionid" : @"5", @"totalCount" : @"5", @"question" : @"星期几?", @"questiontype" : @"1", @"questiontype_text" : @"单选题", @"questionselectnumber" : @"3", @"questiondescribe" : @"星期三:理想今天是星期五,昨天是星期四,真实明天是理想的昨天是星期四,真实的今天是星期三。\n星期日理想今天是星期五明天是星期六真实昨天是理想的明天是星期六真实的今天是星期日。", @"trueanswer" : @"A", @"userAnswer" : @[], @"tkselect" : @[@"A三", @"B四", @"C五"]},
];
for (NSDictionary *dic in array) {
GiGaQuestionModel *model = [[GiGaQuestionModel alloc] initWithDictionary:dic error:nil];
[self.questonArray addObject:model];
}
}
#pragma mark
-(void)getQuestionsInfo{
_currentModel = _questonArray[_page - 1];
[self reloadViews];
}
#pragma mark
-(void)reloadViews{
//
NSString *questionlabelText = [NSString stringWithFormat:@"%@.%@", _currentModel.questionid, _currentModel.question];
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
[paragraphStyle setLineSpacing:4.0f];
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:questionlabelText];
NSDictionary *attrs =@{NSFontAttributeName:[UIFont systemFontOfSize:18]};
[attributedString setAttributes:attrs range:NSMakeRange(0, 2)];
_questionlabel.attributedText = attributedString;
[self.view layoutIfNeeded];//
//
[_questionView reloadViewWithFrame:CGRectMake(0, CGRectGetMaxY(_questionlabel.frame) + 15, KMainW, 0) style:[_currentModel.questiontype intValue] - 1 answerArray:_currentModel.tkselect userAnswers:_currentModel.userAnswer];
}
#pragma mark
-(void)initControls{
//
UIImageView *topBackImagiew = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@""]];
topBackImagiew.backgroundColor = [UIColor lightGrayColor];
[self.view addSubview:topBackImagiew];
[topBackImagiew mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(KMainW - 30*2);
make.height.mas_equalTo(140);
make.top.mas_equalTo(self.view.mas_top).offset(100);
make.left.mas_equalTo(self.view.mas_left).offset(30);
}];
UILabel *desLabel = [[UILabel alloc] init];
desLabel.text = @"通过测试可以得知您是什么肤质,有助于选择更适合的面膜";
desLabel.font = [UIFont systemFontOfSize:22];
desLabel.numberOfLines = 0;
[desLabel sizeToFit];
[topBackImagiew addSubview:desLabel];
[desLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.center.mas_equalTo(topBackImagiew.center);
make.width.mas_equalTo(KMainW - 30*2 - 20*2);
}];
//
UILabel *questionLabel = [[UILabel alloc] init];
questionLabel.textColor = GIGAUIColorFromRGBA(0x292929);
questionLabel.font = [UIFont systemFontOfSize:15.f];
questionLabel.numberOfLines = 0;
[self.view addSubview:questionLabel];
self.questionlabel = questionLabel;
[self.questionlabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.view.mas_left).offset(30);
make.top.mas_equalTo(topBackImagiew.mas_bottom).offset(10);
make.right.mas_equalTo(self.view.mas_right).offset(-30);
}];
//view
GIGAQuetionView *questionView = [[GIGAQuetionView alloc] init];
questionView.backgroundColor = [UIColor lightGrayColor];
[self.view addSubview:questionView];
self.questionView = questionView;
// [self.questionView mas_makeConstraints:^(MASConstraintMaker *make) {
// make.top.mas_equalTo(self.questionlabel.mas_bottom).offset(10);
// make.height.mas_equalTo(0);
// make.left.mas_equalTo(self.view.mas_left).offset(30);
// make.right.mas_equalTo(self.view.mas_right).offset(-30);
// }];
//
UIButton *nextBtn = [UIButton buttonWithType:UIButtonTypeCustom];
nextBtn.backgroundColor = [UIColor purpleColor];
[nextBtn setTitle:@"下一个" forState:UIControlStateNormal];
[nextBtn addTarget:self action:@selector(nextBtnAction) forControlEvents:UIControlEventTouchUpInside];
nextBtn.layer.masksToBounds = YES;
nextBtn.layer.cornerRadius = 2;
[self.view addSubview:nextBtn];
self.nextBtn = nextBtn;
[nextBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.mas_equalTo(self.view.mas_bottom).offset(-100);
make.width.mas_equalTo(160);
make.height.mas_equalTo(40);
make.centerX.mas_equalTo(self.view.mas_centerX);
}];
}
-(void)nextBtnAction{
if (_page == [_currentModel.totalCount integerValue] ) {
GIGA_ShowToast(@"没有了");
return;
}
[self saveProgress];
_page ++ ;
//
[self getQuestionsInfo];
//self.nextBtn.enabled = _page == [_currentModel.totalCount integerValue] ? NO : YES;
}
#pragma mark -
-(void)saveProgress{
NSString *answer = self.questionView.selectAnswer;
NSString *anserNum = self.questionView.qrnum;
NSString *anserid = _currentModel.questionid;
GILog(@"选择答案:%@\n 角标:%@\n 题号:%@",answer,anserNum,anserid);
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end

View File

@ -0,0 +1,43 @@
//
// GiGaQuestionModel.h
// GIGA
//
// Created by lianxiang on 2018/8/23.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <JSONModel/JSONModel.h>
@interface GiGaQuestionModel : JSONModel
//统计题数总量
@property (nonatomic, copy) NSString *totalCount;
//试题id
@property (nonatomic, copy) NSString *questionid;
//试题标题
@property (nonatomic, copy) NSString *question;
//题目类型1单选题 2多选题 3判断题 4填空题 5简答题
@property (nonatomic, copy) NSString *questiontype;
//题目类型文本(单选题、多选题、判断题、填空题、简答题)
@property (nonatomic, copy) NSString *questiontype_text;
//选项数量
@property (nonatomic, copy) NSString *questionselectnumber;
//用户填写的答案
@property (nonatomic, strong) NSMutableArray *userAnswer;
//答案选项
@property (nonatomic, strong) NSMutableArray *tkselect;
//正确答案(单选题、多选题、判断题)
@property (nonatomic, copy) NSString *trueanswer;
//答案分析
@property (nonatomic, copy) NSString *questiondescribe;
@end

View File

@ -0,0 +1,13 @@
//
// GiGaQuestionModel.m
// GIGA
//
// Created by lianxiang on 2018/8/23.
// Copyright © 2018 com.giga.ios. All rights reserved.
//
#import "GiGaQuestionModel.h"
@implementation GiGaQuestionModel
@end

View File

@ -0,0 +1,32 @@
//
// GIGAQuetionView.h
// GIGA
//
// Created by lianxiang on 2018/8/23.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSInteger,GIGAQuetionViewStle)
{
GIGAQuetionViewStleSingleChoice = 0,//单选
GIGAQuetionViewStleMutipleChoice ,//多选
GIGAQuetionViewStyleTrueOrFalse,//判断
};
@interface GIGAQuetionView : UIView
//样式
@property (nonatomic,assign,readonly) GIGAQuetionViewStle style;
//答案数组
@property (nonatomic,strong,readonly) NSArray *answerArr;
//选中答案
@property (nonatomic, copy, readonly) NSString *selectAnswer;
//选中答案角标
@property (nonatomic, copy, readonly) NSString *qrnum;
//刷新布局
- (void)reloadViewWithFrame:(CGRect)frame style:(GIGAQuetionViewStle)style answerArray:(NSArray *)answerArray userAnswers:(NSArray *)userAnswers;
@end

View File

@ -0,0 +1,197 @@
//
// GIGAQuetionView.m
// GIGA
//
// Created by lianxiang on 2018/8/23.
// Copyright © 2018 com.giga.ios. All rights reserved.
//
#import "GIGAQuetionView.h"
#import "GiGaHelper.h"
#import "Masonry.h"
@interface GIGAQuetionView()
@property (nonatomic, weak) UIView *view;
@property (nonatomic, assign, readwrite) GIGAQuetionViewStle style;
@property (nonatomic, strong, readwrite) NSArray *answerArr;
@property (nonatomic, copy, readwrite) NSString *selectAnswer;
@property (nonatomic, copy, readwrite) NSString *qrnum;
@end
@implementation GIGAQuetionView
- (UIView *)view
{
if (!_view) {
UIView *view = [[UIView alloc] init];
//view.backgroundColor = [UIColor blueColor];
[self addSubview:view];
_view = view;
}
return _view;
}
- (instancetype)init
{
if (self = [super init]) {
}
return self;
}
- (void)reloadViewWithFrame:(CGRect)frame style:(GIGAQuetionViewStle)style answerArray:(NSArray *)answerArray userAnswers:(NSArray *)userAnswers
{
self.style = style;
self.answerArr = answerArray;
if (_style == GIGAQuetionViewStyleTrueOrFalse) self.answerArr = @[@"正确", @"错误"];
_selectAnswer = @"";
_qrnum = @"";
if (userAnswers.count > 0) {
_selectAnswer = [userAnswers componentsJoinedByString:@"|"];
for (int i = 0; i < userAnswers.count; i++) {
if ([_qrnum isEqualToString:@""]) {
_qrnum = [NSString stringWithFormat:@"%d", [userAnswers[i] characterAtIndex:0] - 65];
}else {
_qrnum = [_qrnum stringByAppendingString:[NSString stringWithFormat:@"|%d", [userAnswers[i] characterAtIndex:0] - 65]];
}
}
}
[self removeView];
[self creatControlWithFrame:frame];
}
- (void)creatControlWithFrame:(CGRect)frame
{
CGFloat btnH = 25;
CGFloat padding = 10.f;
CGFloat labelY = 0;
UIFont *font = [UIFont systemFontOfSize:14.f];
for (int i = 0; i < _answerArr.count; i++) {
//
NSString *labelText = _answerArr[i];
labelText = [labelText stringByReplacingOccurrencesOfString:@"\r" withString:@""];
labelText = [labelText stringByReplacingOccurrencesOfString:@"\n" withString:@""];
//
CGFloat labelH = [GiGaHelper sizeWithText:labelText font:font maxSize:CGSizeMake(KMainW - 50, MAXFLOAT)].height;
//
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(btnH + 5, labelY + 4, KMainW - 50, labelH)];
label.text = labelText;
label.font = font;
label.numberOfLines = 0;
label.textColor = GIGAUIColorFromRGBA(0x616161);
[self.view addSubview:label];
labelY += MAX(labelH, btnH) + padding;
//
UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(0, CGRectGetMinY(label.frame) - 4, btnH, btnH)];
btn.tag = i + 100;
btn.showsTouchWhenHighlighted = NO;
[btn setImage:[UIImage imageNamed:@"exerc_answer_option_nor"] forState:UIControlStateNormal];
[btn setImage:[UIImage imageNamed:@"exerc_answer_option_sel"] forState:UIControlStateSelected];
[btn addTarget:self action:@selector(btnOnClick:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:btn];
//
UIButton *labelBtn = [[UIButton alloc] initWithFrame:label.frame];
labelBtn.tag = i + 200;
[labelBtn addTarget:self action:@selector(labelBtnOnClick:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:labelBtn];
if ([_qrnum rangeOfString:[NSString stringWithFormat:@"%d", i]].location != NSNotFound) {
btn.selected = YES;
labelBtn.selected = YES;
}
}
self.view.frame = CGRectMake(10, 0, KMainW - 20, labelY - padding);
frame.size.height = labelY - padding;
self.frame = frame;
[self setNeedsUpdateConstraints];
[self mas_updateConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.superview.mas_top).offset(frame.origin.y + 10);
make.left.mas_equalTo(self.superview.mas_left).offset(30);
make.height.mas_equalTo(frame.size.height);
make.width.mas_equalTo(frame.size.width - 30*2);
}];
}
- (void)btnOnClick:(UIButton *)btn
{
[self selectOptionWithBtn:btn tag:100];
[self setBtnSelectedWithTag:100];
}
- (void)labelBtnOnClick:(UIButton *)labelBtn
{
[self selectOptionWithBtn:labelBtn tag:200];
[self setBtnSelectedWithTag:200];
}
- (void)selectOptionWithBtn:(UIButton *)btn tag:(int)tag
{
NSString *selStr = [NSString stringWithFormat:@"%c", (int)btn.tag - tag + 65];
if (_style == GIGAQuetionViewStyleTrueOrFalse || _style == GIGAQuetionViewStleSingleChoice) {
_selectAnswer = selStr;
_qrnum = [NSString stringWithFormat:@"%ld", btn.tag - tag];
for (int i = 0; i < _answerArr.count; i++) {
UIButton *btn = [self.view viewWithTag:i + tag];
btn.selected = NO;
}
btn.selected = YES;
}else if (_style == GIGAQuetionViewStleMutipleChoice) {
btn.selected = !btn.selected;
_selectAnswer = @"";
_qrnum = @"";
for (int i = 0; i < _answerArr.count; i++) {
UIButton *selBtn = [self.view viewWithTag:i + tag];
if (selBtn.selected) {
if ([_selectAnswer isEqualToString:@""]) {
_selectAnswer = [NSString stringWithFormat:@"%c", i + 65];
_qrnum = [NSString stringWithFormat:@"%d", i];
}else {
_selectAnswer = [_selectAnswer stringByAppendingString:[NSString stringWithFormat:@"|%@", [NSString stringWithFormat:@"%c", i + 65]]];
_qrnum = [_qrnum stringByAppendingString:[NSString stringWithFormat:@"|%d", i]];
}
}
}
}
}
- (void)setBtnSelectedWithTag:(NSInteger)tag
{
NSInteger otTag = tag == 100 ? 200 : 100;
for (int i = 0; i < _answerArr.count; i++) {
UIButton *btn = [self.view viewWithTag:i + tag];
UIButton *otBtn = [self.view viewWithTag:i + otTag];
otBtn.selected = btn.selected;
}
}
- (void)removeView
{
[self.view removeFromSuperview];
self.view = nil;
}
- (void)setStyle:(GIGAQuetionViewStle)style
{
_style = style;
}
@end

View File

@ -0,0 +1,13 @@
//
// ActiveMesagelistVC.h
// GIGA
//
// Created by lianxiang on 2018/8/23.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import "GiGaBaseViewController.h"
@interface ActiveMesagelistVC : GiGaBaseViewController
@end

View File

@ -0,0 +1,99 @@
//
// ActiveMesagelistVC.m
// GIGA
//
// Created by lianxiang on 2018/8/23.
// Copyright © 2018 com.giga.ios. All rights reserved.
//
#import "ActiveMesagelistVC.h"
#import "MessageListViewCell.h"
#import "MessageDetailViewController.h"
@interface ActiveMesagelistVC ()
@property (nonatomic,strong) NSMutableArray *dataArr;
@end
@implementation ActiveMesagelistVC
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"活动消息";
_dataArr = [[NSMutableArray alloc] init];
[self.view addSubview:self.tableView];
self.tableView.delegate = self;
self.tableView.dataSource = self;
self.tableView.separatorStyle = UITableViewCellSelectionStyleNone;
self.tableView.tableFooterView = [[UIView alloc] init];
self.tableView.backgroundColor = GIGARGB(242, 242, 242, 1);
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 1;
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
return 3;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 302;
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
return 20;
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
return 1;
}
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
UIView *headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 20)];
headerView.backgroundColor = GIGARGB(242, 242, 242, 1);
UILabel *timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, headerView.frame.size.width, 20)];
timeLabel.textAlignment = NSTextAlignmentCenter;
timeLabel.textColor = [UIColor lightGrayColor];
timeLabel.font = [UIFont systemFontOfSize:14];
timeLabel.text = @"2018年8月22日";
[headerView addSubview:timeLabel];
return headerView;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
MessageListViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MessageListViewCell"];
if (!cell) {
cell = [[[NSBundle mainBundle] loadNibNamed:@"MessageListViewCell" owner:self options:nil] lastObject];
}
//[cell loadCellDataAtIndex:indexPath];
return cell;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
MessageDetailViewController *detailVC = [[MessageDetailViewController alloc] init];
[self.navigationController pushViewController:detailVC animated:YES];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end

View File

@ -0,0 +1,13 @@
//
// GiGaMasssagesVC.h
// GIGA
//
// Created by lianxiang on 2018/8/23.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "GiGaBaseViewController.h"
@interface GiGaMasssagesVC : GiGaBaseViewController
@end

View File

@ -0,0 +1,106 @@
//
// GiGaMasssagesVC.m
// GIGA
//
// Created by lianxiang on 2018/8/23.
// Copyright © 2018 com.giga.ios. All rights reserved.
//
#import "GiGaMasssagesVC.h"
#import "MAssaageCenterCell.h"
#import "ActiveMesagelistVC.h"
#import "GiGaServiceViewController.h"
#import "GiGaSystemViewController.h"
@interface GiGaMasssagesVC ()
@property (nonatomic,strong)NSMutableArray *dataArr;
@end
@implementation GiGaMasssagesVC
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
self.title = @"消息中心";
self.view.backgroundColor = GIGARGB(242, 242, 242, 1);
_dataArr = [NSMutableArray new];
[self.view addSubview:self.tableView];
self.tableView.delegate = self;
self.tableView.dataSource = self;
self.tableView.separatorStyle = UITableViewCellSelectionStyleNone;
self.tableView.tableFooterView = [[UIView alloc] init];
self.tableView.backgroundColor = GIGARGB(242, 242, 242, 1);
self.tableView.tableHeaderView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 5)];
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 1;
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
return 3;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 80;
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
return 0.1;
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
return 10;
}
-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
return [[UIView alloc] init];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
MAssaageCenterCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MAssaageCenterCell"];
if (!cell) {
cell = [[[NSBundle mainBundle] loadNibNamed:@"MAssaageCenterCell" owner:self options:nil] lastObject];
}
[cell loadCellDataAtIndex:indexPath];
return cell;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
if (indexPath.section == 0) {
ActiveMesagelistVC *activeVC = [[ActiveMesagelistVC alloc] init];
[self.navigationController pushViewController:activeVC animated:YES];
}else if (indexPath.section == 1){
GiGaServiceViewController *serviceVC = [[GiGaServiceViewController alloc] init];
[self.navigationController pushViewController:serviceVC animated:YES];
}else{
GiGaSystemViewController *systemVC = [[GiGaSystemViewController alloc] init];
[self.navigationController pushViewController:systemVC animated:YES];
}
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end

View File

@ -0,0 +1,13 @@
//
// GiGaServiceViewController.h
// GIGA
//
// Created by lianxiang on 2018/8/23.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import "GiGaBaseViewController.h"
@interface GiGaServiceViewController : GiGaBaseViewController
@end

View File

@ -0,0 +1,39 @@
//
// GiGaServiceViewController.m
// GIGA
//
// Created by lianxiang on 2018/8/23.
// Copyright © 2018 com.giga.ios. All rights reserved.
//
#import "GiGaServiceViewController.h"
@interface GiGaServiceViewController ()
@end
@implementation GiGaServiceViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"服务消息";
self.view.backgroundColor = GIGARGB(242, 242, 242, 1);
// Do any additional setup after loading the view.
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end

View File

@ -0,0 +1,13 @@
//
// GiGaSystemViewController.h
// GIGA
//
// Created by lianxiang on 2018/8/23.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import "GiGaBaseViewController.h"
@interface GiGaSystemViewController : GiGaBaseViewController
@end

View File

@ -0,0 +1,40 @@
//
// GiGaSystemViewController.m
// GIGA
//
// Created by lianxiang on 2018/8/23.
// Copyright © 2018 com.giga.ios. All rights reserved.
//
#import "GiGaSystemViewController.h"
@interface GiGaSystemViewController ()
@end
@implementation GiGaSystemViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"系统消息";
self.view.backgroundColor = GIGARGB(242, 242, 242, 1);
// Do any additional setup after loading the view.
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end

View File

@ -0,0 +1,13 @@
//
// MessageDetailViewController.h
// GIGA
//
// Created by lianxiang on 2018/8/23.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import "GiGaBaseViewController.h"
@interface MessageDetailViewController : GiGaBaseViewController
@end

View File

@ -0,0 +1,39 @@
//
// MessageDetailViewController.m
// GIGA
//
// Created by lianxiang on 2018/8/23.
// Copyright © 2018 com.giga.ios. All rights reserved.
//
#import "MessageDetailViewController.h"
@interface MessageDetailViewController ()
@end
@implementation MessageDetailViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"消息详情";
self.view.backgroundColor = GIGARGB(242, 242, 242, 1);
// Do any additional setup after loading the view.
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end

View File

@ -0,0 +1,18 @@
//
// MAssaageCenterCell.h
// GIGA
//
// Created by lianxiang on 2018/8/23.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface MAssaageCenterCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UIImageView *messageTypeIcon;
@property (weak, nonatomic) IBOutlet UILabel *mesageTypeLabel;
@property (weak, nonatomic) IBOutlet UILabel *detailLabel;
@property (weak, nonatomic) IBOutlet UILabel *messageCountLabel;
-(void)loadCellDataAtIndex:(NSIndexPath *)indexPath;
@end

View File

@ -0,0 +1,42 @@
//
// MAssaageCenterCell.m
// GIGA
//
// Created by lianxiang on 2018/8/23.
// Copyright © 2018 com.giga.ios. All rights reserved.
//
#import "MAssaageCenterCell.h"
@implementation MAssaageCenterCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
self.messageCountLabel.layer.masksToBounds = YES;
self.messageCountLabel.layer.cornerRadius = self.messageCountLabel.frame.size.height / 2;
}
-(void)loadCellDataAtIndex:(NSIndexPath *)indexPath{
if (indexPath.section == 0) {
self.mesageTypeLabel.text = @"活动消息";
}else if (indexPath.section ==1){
self.mesageTypeLabel.text = @"服务消息";
}else{
self.mesageTypeLabel.text = @"系统消息";
}
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end

View File

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="MAssaageCenterCell" id="KGk-i7-Jjw" customClass="MAssaageCenterCell">
<rect key="frame" x="0.0" y="0.0" width="375" height="80"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="341" height="79.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="消息类型" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ix3-eK-z1l">
<rect key="frame" x="94" y="14" width="62" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="消息详情" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vAa-ci-fXs">
<rect key="frame" x="96" y="48" width="58" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="C4B-7U-hHJ">
<rect key="frame" x="16" y="14" width="53" height="51"/>
<color key="backgroundColor" red="0.40468725620000001" green="1" blue="0.9282041969" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="width" constant="53" id="Skp-Og-ZYW"/>
<constraint firstAttribute="height" constant="51" id="z9q-41-BTw"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="1" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="E3D-vF-RAu">
<rect key="frame" x="306" y="29" width="20" height="20"/>
<color key="backgroundColor" red="1" green="0.34901960784313724" blue="0.094117647058823528" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="Nfi-Su-Taw"/>
<constraint firstAttribute="width" constant="20" id="pAn-7E-qge"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="C4B-7U-hHJ" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="5yf-7H-rvZ"/>
<constraint firstItem="E3D-vF-RAu" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="GgW-2e-PKC"/>
<constraint firstItem="vAa-ci-fXs" firstAttribute="leading" secondItem="C4B-7U-hHJ" secondAttribute="trailing" constant="27" id="Kl1-mk-Nt4"/>
<constraint firstItem="Ix3-eK-z1l" firstAttribute="leading" secondItem="C4B-7U-hHJ" secondAttribute="trailing" constant="25" id="U3u-4z-WWD"/>
<constraint firstItem="C4B-7U-hHJ" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="16" id="krq-zT-5tg"/>
<constraint firstAttribute="trailing" secondItem="E3D-vF-RAu" secondAttribute="trailing" constant="15" id="mJl-Wb-KWg"/>
<constraint firstItem="vAa-ci-fXs" firstAttribute="top" secondItem="Ix3-eK-z1l" secondAttribute="bottom" constant="16" id="ptn-X9-NJG"/>
<constraint firstItem="Ix3-eK-z1l" firstAttribute="top" secondItem="C4B-7U-hHJ" secondAttribute="top" id="qrl-hO-kND"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
<connections>
<outlet property="detailLabel" destination="vAa-ci-fXs" id="VyJ-cP-sjR"/>
<outlet property="mesageTypeLabel" destination="Ix3-eK-z1l" id="toV-Yx-EVx"/>
<outlet property="messageCountLabel" destination="E3D-vF-RAu" id="5xD-p3-pLC"/>
<outlet property="messageTypeIcon" destination="C4B-7U-hHJ" id="DqV-Zf-PE1"/>
</connections>
<point key="canvasLocation" x="-38.5" y="-56"/>
</tableViewCell>
</objects>
</document>

View File

@ -0,0 +1,14 @@
//
// MessageListViewCell.h
// GIGA
//
// Created by lianxiang on 2018/8/23.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface MessageListViewCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UIView *backGView;
@end

View File

@ -0,0 +1,24 @@
//
// MessageListViewCell.m
// GIGA
//
// Created by lianxiang on 2018/8/23.
// Copyright © 2018 com.giga.ios. All rights reserved.
//
#import "MessageListViewCell.h"
@implementation MessageListViewCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end

View File

@ -0,0 +1,113 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="MessageListViewCell" rowHeight="302" id="KGk-i7-Jjw" customClass="MessageListViewCell">
<rect key="frame" x="0.0" y="0.0" width="369" height="302"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="369" height="301.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="VBK-gc-JQP">
<rect key="frame" x="16" y="0.0" width="337" height="301.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="面膜时间" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ADm-L9-z8w">
<rect key="frame" x="17" y="8" width="70" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="进行中" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wfT-6k-vcz">
<rect key="frame" x="276" y="8" width="53" height="21"/>
<color key="backgroundColor" red="0.10196078431372549" green="0.73725490196078436" blue="0.61176470588235299" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="72c-ZW-y6I"/>
<constraint firstAttribute="width" constant="53" id="hDh-F8-nJj"/>
</constraints>
<fontDescription key="fontDescription" type="italicSystem" pointSize="12"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="描述描述描述描述描述描述描述" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MdN-O1-ZfX">
<rect key="frame" x="13" y="185" width="200" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" white="0.66666666669999997" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Ot8-cZ-UBc">
<rect key="frame" x="13" y="49" width="312" height="128"/>
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="128" id="vut-ZA-7fO"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="查看详情" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mh5-y8-DwA">
<rect key="frame" x="13" y="272" width="54" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" white="0.66666666669999997" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="WzP-4A-azJ">
<rect key="frame" x="289" y="267" width="28" height="27"/>
<color key="backgroundColor" red="1" green="0.34901960780000002" blue="0.094117647060000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="27" id="RrA-04-4tm"/>
<constraint firstAttribute="width" constant="28" id="Utc-wv-RIN"/>
</constraints>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="P9q-1N-zch">
<rect key="frame" x="0.0" y="254" width="337" height="1"/>
<color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="4me-7g-u1y"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="wfT-6k-vcz" secondAttribute="trailing" constant="8" id="3SU-8f-RdN"/>
<constraint firstItem="Ot8-cZ-UBc" firstAttribute="top" secondItem="ADm-L9-z8w" secondAttribute="bottom" constant="20" id="6VI-yd-4lY"/>
<constraint firstAttribute="bottom" secondItem="WzP-4A-azJ" secondAttribute="bottom" constant="7.5" id="CSp-oG-yOb"/>
<constraint firstItem="WzP-4A-azJ" firstAttribute="top" secondItem="P9q-1N-zch" secondAttribute="bottom" constant="12" id="TXG-Qa-2mJ"/>
<constraint firstItem="wfT-6k-vcz" firstAttribute="top" secondItem="VBK-gc-JQP" secondAttribute="top" constant="8" id="UEf-gb-1Nq"/>
<constraint firstItem="ADm-L9-z8w" firstAttribute="top" secondItem="VBK-gc-JQP" secondAttribute="top" constant="8" id="Ukd-Cj-Dfa"/>
<constraint firstItem="ADm-L9-z8w" firstAttribute="leading" secondItem="VBK-gc-JQP" secondAttribute="leading" constant="17" id="Zkt-lg-DKx"/>
<constraint firstItem="Ot8-cZ-UBc" firstAttribute="leading" secondItem="VBK-gc-JQP" secondAttribute="leading" constant="13" id="aIl-Np-RC8"/>
<constraint firstItem="MdN-O1-ZfX" firstAttribute="leading" secondItem="VBK-gc-JQP" secondAttribute="leading" constant="13" id="hnz-kH-DqU"/>
<constraint firstAttribute="trailing" secondItem="P9q-1N-zch" secondAttribute="trailing" id="mBx-Je-Dh4"/>
<constraint firstAttribute="trailing" secondItem="WzP-4A-azJ" secondAttribute="trailing" constant="20" id="mlx-rO-FRo"/>
<constraint firstItem="P9q-1N-zch" firstAttribute="leading" secondItem="VBK-gc-JQP" secondAttribute="leading" id="qNE-KK-Jqn"/>
<constraint firstItem="MdN-O1-ZfX" firstAttribute="top" secondItem="Ot8-cZ-UBc" secondAttribute="bottom" constant="8" id="sI8-Vf-Mvn"/>
<constraint firstItem="mh5-y8-DwA" firstAttribute="leading" secondItem="VBK-gc-JQP" secondAttribute="leading" constant="13" id="sUh-Xy-7RJ"/>
<constraint firstAttribute="bottom" secondItem="mh5-y8-DwA" secondAttribute="bottom" constant="13.5" id="vKg-dG-ygT"/>
<constraint firstAttribute="trailing" secondItem="Ot8-cZ-UBc" secondAttribute="trailing" constant="12" id="wgX-X2-VKT"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="VBK-gc-JQP" secondAttribute="bottom" id="068-0N-LBX"/>
<constraint firstItem="VBK-gc-JQP" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="16" id="14D-Nt-qes"/>
<constraint firstItem="VBK-gc-JQP" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="IYq-6R-eXI"/>
<constraint firstAttribute="trailing" secondItem="VBK-gc-JQP" secondAttribute="trailing" constant="16" id="wMS-Oh-fyk"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
<connections>
<outlet property="backGView" destination="VBK-gc-JQP" id="Zht-54-yF6"/>
</connections>
<point key="canvasLocation" x="-12.5" y="-5"/>
</tableViewCell>
</objects>
</document>

View File

@ -16,7 +16,6 @@
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor purpleColor];
// Do any additional setup after loading the view, typically from a nib.