fix
This commit is contained in:
@@ -38,6 +38,12 @@
|
||||
8342FD862150FD5200D141F4 /* VersionModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8342FD852150FD5200D141F4 /* VersionModel.m */; };
|
||||
8342FD8A2151095100D141F4 /* AppVersionLogoCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8342FD882151095100D141F4 /* AppVersionLogoCell.m */; };
|
||||
8342FD8B2151095100D141F4 /* AppVersionLogoCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8342FD892151095100D141F4 /* AppVersionLogoCell.xib */; };
|
||||
834415EA215B4E6F00A6D906 /* HistoryNoDataViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 834415E8215B4E6F00A6D906 /* HistoryNoDataViewCell.m */; };
|
||||
834415EB215B4E6F00A6D906 /* HistoryNoDataViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 834415E9215B4E6F00A6D906 /* HistoryNoDataViewCell.xib */; };
|
||||
834415EF215B52EF00A6D906 /* MaskTestNODataViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 834415ED215B52EF00A6D906 /* MaskTestNODataViewCell.m */; };
|
||||
834415F0215B52EF00A6D906 /* MaskTestNODataViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 834415EE215B52EF00A6D906 /* MaskTestNODataViewCell.xib */; };
|
||||
834415F3215B5F8200A6D906 /* GiGaShareModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 834415F2215B5F8200A6D906 /* GiGaShareModel.m */; };
|
||||
834415F6215B89A300A6D906 /* MaskTimeTopAnimationView.m in Sources */ = {isa = PBXBuildFile; fileRef = 834415F5215B89A300A6D906 /* MaskTimeTopAnimationView.m */; };
|
||||
8345C13621414D3B00051717 /* NSString+Unicode.m in Sources */ = {isa = PBXBuildFile; fileRef = 8345C13521414D3B00051717 /* NSString+Unicode.m */; };
|
||||
8349585C212511040064DB6C /* AppDelegate+ThirdParty.m in Sources */ = {isa = PBXBuildFile; fileRef = 8349585B212511040064DB6C /* AppDelegate+ThirdParty.m */; };
|
||||
835060A2212D1225007E6220 /* GiGaMeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 835060A1212D1225007E6220 /* GiGaMeViewController.m */; };
|
||||
@@ -306,6 +312,16 @@
|
||||
8342FD872151095100D141F4 /* AppVersionLogoCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppVersionLogoCell.h; sourceTree = "<group>"; };
|
||||
8342FD882151095100D141F4 /* AppVersionLogoCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppVersionLogoCell.m; sourceTree = "<group>"; };
|
||||
8342FD892151095100D141F4 /* AppVersionLogoCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AppVersionLogoCell.xib; sourceTree = "<group>"; };
|
||||
834415E7215B4E6F00A6D906 /* HistoryNoDataViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HistoryNoDataViewCell.h; sourceTree = "<group>"; };
|
||||
834415E8215B4E6F00A6D906 /* HistoryNoDataViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HistoryNoDataViewCell.m; sourceTree = "<group>"; };
|
||||
834415E9215B4E6F00A6D906 /* HistoryNoDataViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HistoryNoDataViewCell.xib; sourceTree = "<group>"; };
|
||||
834415EC215B52EF00A6D906 /* MaskTestNODataViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MaskTestNODataViewCell.h; sourceTree = "<group>"; };
|
||||
834415ED215B52EF00A6D906 /* MaskTestNODataViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MaskTestNODataViewCell.m; sourceTree = "<group>"; };
|
||||
834415EE215B52EF00A6D906 /* MaskTestNODataViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MaskTestNODataViewCell.xib; sourceTree = "<group>"; };
|
||||
834415F1215B5F8200A6D906 /* GiGaShareModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaShareModel.h; sourceTree = "<group>"; };
|
||||
834415F2215B5F8200A6D906 /* GiGaShareModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaShareModel.m; sourceTree = "<group>"; };
|
||||
834415F4215B89A300A6D906 /* MaskTimeTopAnimationView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MaskTimeTopAnimationView.h; sourceTree = "<group>"; };
|
||||
834415F5215B89A300A6D906 /* MaskTimeTopAnimationView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MaskTimeTopAnimationView.m; sourceTree = "<group>"; };
|
||||
8345C13421414D3B00051717 /* NSString+Unicode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSString+Unicode.h"; sourceTree = "<group>"; };
|
||||
8345C13521414D3B00051717 /* NSString+Unicode.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSString+Unicode.m"; sourceTree = "<group>"; };
|
||||
8349585A212511040064DB6C /* AppDelegate+ThirdParty.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "AppDelegate+ThirdParty.h"; sourceTree = "<group>"; };
|
||||
@@ -845,6 +861,8 @@
|
||||
children = (
|
||||
8392900D2134FA0A0077D2E8 /* GiGaCommentModel.h */,
|
||||
8392900E2134FA0A0077D2E8 /* GiGaCommentModel.m */,
|
||||
834415F1215B5F8200A6D906 /* GiGaShareModel.h */,
|
||||
834415F2215B5F8200A6D906 /* GiGaShareModel.m */,
|
||||
);
|
||||
path = Model;
|
||||
sourceTree = "<group>";
|
||||
@@ -862,6 +880,8 @@
|
||||
83928FF92134D8F60077D2E8 /* GiGaFlyingCommitInputView.m */,
|
||||
83BFAE79213D3F3A004EF801 /* MaskTimeCircularProgressView.h */,
|
||||
83BFAE7A213D3F3A004EF801 /* MaskTimeCircularProgressView.m */,
|
||||
834415F4215B89A300A6D906 /* MaskTimeTopAnimationView.h */,
|
||||
834415F5215B89A300A6D906 /* MaskTimeTopAnimationView.m */,
|
||||
);
|
||||
path = View;
|
||||
sourceTree = "<group>";
|
||||
@@ -1488,6 +1508,9 @@
|
||||
8384F0ED2153355A002C19F0 /* MaskResultShareViewCell.m */,
|
||||
8384F0EF21538146002C19F0 /* MaskResultCandView.h */,
|
||||
8384F0F021538146002C19F0 /* MaskResultCandView.m */,
|
||||
834415EC215B52EF00A6D906 /* MaskTestNODataViewCell.h */,
|
||||
834415ED215B52EF00A6D906 /* MaskTestNODataViewCell.m */,
|
||||
834415EE215B52EF00A6D906 /* MaskTestNODataViewCell.xib */,
|
||||
);
|
||||
path = MaskResultViews;
|
||||
sourceTree = "<group>";
|
||||
@@ -1635,6 +1658,9 @@
|
||||
83C78A11215873170083DDD9 /* MaskHistoryListViewCell.h */,
|
||||
83C78A12215873170083DDD9 /* MaskHistoryListViewCell.m */,
|
||||
83C78A13215873170083DDD9 /* MaskHistoryListViewCell.xib */,
|
||||
834415E7215B4E6F00A6D906 /* HistoryNoDataViewCell.h */,
|
||||
834415E8215B4E6F00A6D906 /* HistoryNoDataViewCell.m */,
|
||||
834415E9215B4E6F00A6D906 /* HistoryNoDataViewCell.xib */,
|
||||
);
|
||||
path = HistoryView;
|
||||
sourceTree = "<group>";
|
||||
@@ -1822,6 +1848,7 @@
|
||||
8376B8332154A39200AB79F8 /* MaskTimeEndActionViewCell.xib in Resources */,
|
||||
838762D9214B9EF80039D241 /* GIGaUserIDViewCell.xib in Resources */,
|
||||
838762E8214B9FA60039D241 /* GIGaUserCityViewCell.xib in Resources */,
|
||||
834415EB215B4E6F00A6D906 /* HistoryNoDataViewCell.xib in Resources */,
|
||||
8342FD8B2151095100D141F4 /* AppVersionLogoCell.xib in Resources */,
|
||||
8382DFEF21564A1F00BBA5A5 /* photopicker_back.png in Resources */,
|
||||
83BFAE68213CCF10004EF801 /* GiGaMineUserViewCell.xib in Resources */,
|
||||
@@ -1842,6 +1869,7 @@
|
||||
8382DFF121564A1F00BBA5A5 /* photopicker_back@2x.png in Resources */,
|
||||
8382DFB221562B0A00BBA5A5 /* GIGaFeedQQViewCell.xib in Resources */,
|
||||
8338F6B12142182200B4780B /* MaskTime.png in Resources */,
|
||||
834415F0215B52EF00A6D906 /* MaskTestNODataViewCell.xib in Resources */,
|
||||
83346ACF212BD7830054D597 /* GiGaWebViewController.xib in Resources */,
|
||||
83C78A15215873170083DDD9 /* MaskHistoryListViewCell.xib in Resources */,
|
||||
);
|
||||
@@ -1955,6 +1983,7 @@
|
||||
838500DC2137F3F7003514A3 /* GiGaAttributedLabel.m in Sources */,
|
||||
83BFAE7B213D3F3A004EF801 /* MaskTimeCircularProgressView.m in Sources */,
|
||||
8382DFF721564A1F00BBA5A5 /* SJPhotoPickerRaidoButton.m in Sources */,
|
||||
834415EF215B52EF00A6D906 /* MaskTestNODataViewCell.m in Sources */,
|
||||
8382DFF321564A1F00BBA5A5 /* SJPreviewPhotoCell.m in Sources */,
|
||||
8314D2112133ABE500B458BF /* WeiIXinApiManager.m in Sources */,
|
||||
83BDC0582147B89900E74E0D /* GiGaAnswerViewCell.m in Sources */,
|
||||
@@ -1987,10 +2016,12 @@
|
||||
83346ACE212BD7830054D597 /* GiGaWebViewController.m in Sources */,
|
||||
8357ADD82124027D000816F2 /* GiGaUserDefault.m in Sources */,
|
||||
8382DFE821564A1F00BBA5A5 /* SJPhotoModel.m in Sources */,
|
||||
834415F3215B5F8200A6D906 /* GiGaShareModel.m in Sources */,
|
||||
8382DFF521564A1F00BBA5A5 /* SJPhotoPickerNavBar.m in Sources */,
|
||||
8384F0F121538146002C19F0 /* MaskResultCandView.m in Sources */,
|
||||
83835BB6212E5174001480F2 /* GiGaServiceViewController.m in Sources */,
|
||||
835147352152003700B25A88 /* GiGaFeedBackViewController.m in Sources */,
|
||||
834415F6215B89A300A6D906 /* MaskTimeTopAnimationView.m in Sources */,
|
||||
8390116E214E20B2004CA790 /* LYSDateLogicViewController.m in Sources */,
|
||||
8361B40721215E6F00238FEB /* GiGaHelper.m in Sources */,
|
||||
835147382152147600B25A88 /* GiGaUserInfoVC.m in Sources */,
|
||||
@@ -2091,6 +2122,7 @@
|
||||
836EE5DA2136716100F0ABB2 /* NSTimer+Convenience.m in Sources */,
|
||||
83A22712212A9EA900B3E75C /* UIView+Sizes.m in Sources */,
|
||||
839290092134F4C40077D2E8 /* GiGaFlingCommitVC.m in Sources */,
|
||||
834415EA215B4E6F00A6D906 /* HistoryNoDataViewCell.m in Sources */,
|
||||
83BFAE70213CDB29004EF801 /* GiMaskTimeHistoryVC.m in Sources */,
|
||||
8382DFEA21564A1F00BBA5A5 /* SJPhotoAlbumsController.m in Sources */,
|
||||
83A22718212ABDFF00B3E75C /* GiGaBlockButton.m in Sources */,
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
//WXApiDelegate
|
||||
- (void)onReq:(BaseReq *)req{
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)onResp:(BaseResp *)resp{
|
||||
@@ -79,6 +80,10 @@
|
||||
}else{
|
||||
[[UIApplication sharedApplication].keyWindow makeToast:@"授权失败" duration:1.6 position:CSToastPositionCenter];
|
||||
}
|
||||
}else if ([resp isKindOfClass:[SendMessageToWXResp class]]){
|
||||
if (resp.errCode == 0) {
|
||||
NC_POST_NAME_OBJECT(NC_UseShareSuccessNoti, nil);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,17 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "btn_talk@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "share_oneblack@2x.png",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.3 KiB |
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "user_day@2x.png",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 568 B |
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "user_time@2x.png",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 911 B |
@@ -36,12 +36,12 @@
|
||||
[manager GET:url parameters:params progress:^(NSProgress * _Nonnull downloadProgress) {
|
||||
|
||||
} success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
|
||||
|
||||
NSLog(@"%@", responseObject);
|
||||
NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingAllowFragments error:nil];
|
||||
NSDictionary *headerFields = [(NSHTTPURLResponse *)task.response allHeaderFields];
|
||||
block(dict, headerFields, nil);
|
||||
|
||||
if (responseObject) {
|
||||
NSLog(@"%@", responseObject);
|
||||
NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingAllowFragments error:nil];
|
||||
NSDictionary *headerFields = [(NSHTTPURLResponse *)task.response allHeaderFields];
|
||||
block(dict, headerFields, nil);
|
||||
}
|
||||
|
||||
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
|
||||
NSDictionary *headerFields = [(NSHTTPURLResponse *)task.response allHeaderFields];
|
||||
@@ -58,10 +58,12 @@
|
||||
|
||||
} success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
|
||||
|
||||
NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingAllowFragments error:nil];
|
||||
NSLog(@"%@", dict);
|
||||
NSDictionary *headerFields = [(NSHTTPURLResponse *)task.response allHeaderFields];
|
||||
block(dict, headerFields, nil);
|
||||
if (responseObject) {
|
||||
NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingAllowFragments error:nil];
|
||||
NSLog(@"%@", dict);
|
||||
NSDictionary *headerFields = [(NSHTTPURLResponse *)task.response allHeaderFields];
|
||||
block(dict, headerFields, nil);
|
||||
}
|
||||
|
||||
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
|
||||
NSDictionary *headerFields = [(NSHTTPURLResponse *)task.response allHeaderFields];
|
||||
@@ -88,10 +90,12 @@
|
||||
|
||||
} success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
|
||||
|
||||
NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingAllowFragments error:nil];
|
||||
NSLog(@"%@", dict);
|
||||
if (success) {
|
||||
success(responseObject);
|
||||
if (responseObject) {
|
||||
NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingAllowFragments error:nil];
|
||||
NSLog(@"%@", dict);
|
||||
if (success) {
|
||||
success(responseObject);
|
||||
}
|
||||
}
|
||||
|
||||
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
|
||||
@@ -145,12 +149,18 @@
|
||||
} downloadProgress:^(NSProgress * _Nonnull downloadProgress) {
|
||||
|
||||
} completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) {
|
||||
if (responseObject) {
|
||||
NSDictionary *responseDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableContainers error:nil];
|
||||
|
||||
NSDictionary *responseDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableContainers error:nil];
|
||||
|
||||
if (completionHandler) {
|
||||
completionHandler(response,responseDic,error);
|
||||
if (completionHandler) {
|
||||
completionHandler(response,responseDic,error);
|
||||
}
|
||||
}else{
|
||||
if (completionHandler) {
|
||||
completionHandler(nil,nil,error);
|
||||
}
|
||||
}
|
||||
|
||||
}];
|
||||
|
||||
[task resume];
|
||||
@@ -193,12 +203,13 @@
|
||||
} progress:^(NSProgress * _Nonnull uploadProgress) {
|
||||
|
||||
} success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
|
||||
|
||||
NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingAllowFragments error:nil];
|
||||
NSLog(@"%@", dict);
|
||||
NSDictionary *headerFields = [(NSHTTPURLResponse *)task.response allHeaderFields];
|
||||
if (block) {
|
||||
block(dict, headerFields, nil);
|
||||
if (responseObject) {
|
||||
NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingAllowFragments error:nil];
|
||||
NSLog(@"%@", dict);
|
||||
NSDictionary *headerFields = [(NSHTTPURLResponse *)task.response allHeaderFields];
|
||||
if (block) {
|
||||
block(dict, headerFields, nil);
|
||||
}
|
||||
}
|
||||
|
||||
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
|
||||
|
||||
@@ -131,7 +131,8 @@ NSString *const kMaskeTime= @"userMaskeTime";
|
||||
|
||||
NSTimeInterval time = [UD_STADARDUD doubleForKey:kMaskeTime];
|
||||
if (time == 0) {
|
||||
//time = 16 * 60;
|
||||
//默认17 分钟
|
||||
time = 17 * 60;
|
||||
time = MASKTIME_DEFAULT;
|
||||
}
|
||||
return time;
|
||||
|
||||
@@ -51,5 +51,12 @@
|
||||
|
||||
//获取测试题列表
|
||||
#define kApiSkinTestQuestionList @"activity/maskquestion/v1/list"
|
||||
//开始敷面膜
|
||||
#define KApiBeginMaskTime @"activity/maskuselog/v1/begin"
|
||||
//结束敷面膜
|
||||
#define kApiEndMaskTime @"activity/maskuselog/v1/end"
|
||||
//每日分享
|
||||
#define kApiShareAction @"activity/maskuselog/v1/sharedata"
|
||||
|
||||
|
||||
#endif /* ApiRequestConfig_h */
|
||||
|
||||
@@ -51,6 +51,10 @@ UD_SYNC
|
||||
#define kUserAvatorUpdateNoti @"userAvatorUpdate"
|
||||
//用户昵称修改
|
||||
#define kUserNameUpDateNoti @"userNickNameUpdate"
|
||||
//分享成功
|
||||
#define NC_UseShareSuccessNoti @"GIGaUsershareSuccess"
|
||||
|
||||
|
||||
|
||||
//微信登陆授权成功
|
||||
#define kWeiXinAuthrization_Success @"WXAuthSuccess"
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
// 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.
|
||||
#ifdef __OBJC__
|
||||
|
||||
#import "AFNetworking.h"
|
||||
#import <JSONModel/JSONModel.h>
|
||||
#import <UMCommon/UMCommon.h>
|
||||
@@ -19,6 +20,7 @@
|
||||
#import "WXApiObject.h"
|
||||
|
||||
#endif
|
||||
|
||||
#import "GiGaUserDefault.h"
|
||||
|
||||
#import "GIGA.h"
|
||||
|
||||
@@ -163,6 +163,7 @@
|
||||
|
||||
self.registBtn.layer.masksToBounds = YES;
|
||||
self.registBtn.layer.cornerRadius = self.registBtn.frame.size.height / 2;
|
||||
self.registBtn.userInteractionEnabled = NO;
|
||||
|
||||
}
|
||||
|
||||
@@ -247,15 +248,15 @@
|
||||
-(void)checkBtnAction:(UIButton *)btn{
|
||||
btn.selected = !btn.selected;
|
||||
if (btn.selected) {
|
||||
[btn setImage:[UIImage imageNamed:@"btn_turndown"] forState:UIControlStateSelected];
|
||||
|
||||
[self.registBtn setBackgroundColor:[UIColor lightGrayColor]];
|
||||
self.registBtn.userInteractionEnabled = NO;
|
||||
[btn setImage:[UIImage imageNamed:@"btn_right"] forState:UIControlStateNormal];
|
||||
[self.registBtn setBackgroundColor:GIGARGB(181,14,14, 1)];
|
||||
self.registBtn.userInteractionEnabled = YES;
|
||||
|
||||
}else{
|
||||
[btn setImage:[UIImage imageNamed:@"btn_right"] forState:UIControlStateNormal];
|
||||
[self.registBtn setBackgroundColor:GIGARGB(0, 222, 189, 1)];
|
||||
self.registBtn.userInteractionEnabled = YES;
|
||||
[btn setImage:[UIImage imageNamed:@"btn_turndown"] forState:UIControlStateSelected];
|
||||
[self.registBtn setBackgroundColor:[UIColor lightGrayColor]];
|
||||
self.registBtn.userInteractionEnabled = NO;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hZA-nj-Wmu">
|
||||
<rect key="frame" x="84" y="437" width="207" height="41"/>
|
||||
<color key="backgroundColor" red="0.70980392156862748" green="0.054901960784313725" blue="0.054901960784313725" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="41" id="IZZ-Wn-zMh"/>
|
||||
</constraints>
|
||||
@@ -120,7 +120,7 @@
|
||||
<constraint firstAttribute="height" constant="37" id="sLA-cD-5zI"/>
|
||||
</constraints>
|
||||
<inset key="imageEdgeInsets" minX="14" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||
<state key="normal" image="btn_right"/>
|
||||
<state key="normal" image="btn_turndown"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
@@ -171,7 +171,7 @@
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="btn_meaasag" width="76" height="22"/>
|
||||
<image name="btn_right" width="14" height="14"/>
|
||||
<image name="btn_turndown" width="14" height="14"/>
|
||||
<image name="img_circle_avatar" width="114" height="114"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
||||
@@ -245,7 +245,9 @@
|
||||
-(void)WeiXinLongIn:(NSNotification *)notification{
|
||||
//检查网络
|
||||
//[self testNetworkStatus];
|
||||
|
||||
[self.view makeToastActivity:CSToastPositionCenter];
|
||||
|
||||
NSDictionary *param = @{
|
||||
@"appid":WXin_APPID,
|
||||
@"secret":WXin_APPSecret,
|
||||
|
||||
@@ -9,5 +9,6 @@
|
||||
#import "GiGaBaseViewController.h"
|
||||
|
||||
@interface GIGaMaskShareViewController : GiGaBaseViewController
|
||||
@property(nonatomic,copy) NSString *maskTimeId;
|
||||
|
||||
@end
|
||||
|
||||
@@ -14,8 +14,11 @@
|
||||
#import "MaskTimeShareActionSheet.h"
|
||||
#import "GIGaUserFileHelper.h"
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
#import "GiGaBaseAPiRequest.h"
|
||||
#import "GiGaShareModel.h"
|
||||
#import "UIImageView+WebCache.h"
|
||||
@interface GIGaMaskShareViewController ()<UIImagePickerControllerDelegate,UINavigationControllerDelegate>
|
||||
|
||||
@property(nonatomic,strong) GiGaShareModel *model;
|
||||
@end
|
||||
|
||||
@implementation GIGaMaskShareViewController
|
||||
@@ -33,7 +36,9 @@
|
||||
self.tableView.estimatedSectionHeaderHeight = 0;
|
||||
//self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectMake(0, 0,self.view.frame.size.width, 30)];
|
||||
self.tableView.frame = CGRectMake(0,0,KMainW, self.view.frame.size.height);
|
||||
// Do any additional setup after loading the view.
|
||||
|
||||
[self requestshareInfo];
|
||||
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
@@ -56,13 +61,29 @@
|
||||
cell = [[[NSBundle mainBundle] loadNibNamed:@"MaskTimeEndViewImgaeCell" owner:self options:nil] lastObject];
|
||||
|
||||
}
|
||||
if (self.model) {
|
||||
cell.minuteLab.text = [NSString stringWithFormat:@"%@min",self.model.minute];
|
||||
cell.timeLable.text = [NSString stringWithFormat:@"这是您敷面膜的第:%@张",self.model.monthMaskNum];
|
||||
}
|
||||
return cell;
|
||||
|
||||
}else if (indexPath.section == 1){
|
||||
MaskTimeTimeViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MaskTimeTimeViewCell"];
|
||||
if (!cell) {
|
||||
cell = [[[NSBundle mainBundle] loadNibNamed:@"MaskTimeTimeViewCell" owner:self options:nil] lastObject];
|
||||
|
||||
}
|
||||
if (self.model) {
|
||||
cell.timeLabe.text = self.model.minute;
|
||||
CGFloat percent = [self.model.exquisite floatValue];
|
||||
int perrr = percent * 100;
|
||||
NSString *per = [NSString stringWithFormat:@"%d",perrr];
|
||||
cell.percentLabe.text = per;
|
||||
cell.totalTime.text = self.model.totalMaskNum;
|
||||
NSURL *url = [NSURL URLWithString:self.model.headImgUrl];
|
||||
[cell.useravator sd_setImageWithURL:url placeholderImage:[UIImage imageNamed:@"nav_circle_avatar"]];
|
||||
}
|
||||
|
||||
return cell;
|
||||
|
||||
}else if (indexPath.section == 2){
|
||||
@@ -86,7 +107,7 @@
|
||||
return 205;
|
||||
}
|
||||
|
||||
return 90;
|
||||
return 120;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
|
||||
@@ -101,7 +122,7 @@
|
||||
|
||||
#pragma mark changeBackBtnAction
|
||||
-(void)changeBackBtnAction{
|
||||
MaskTimeShareActionSheet * sheet = [[MaskTimeShareActionSheet alloc] initWithFrame:CGRectMake(0, 0, KMainW, KMainH)];
|
||||
MaskTimeShareActionSheet * sheet = [MaskTimeShareActionSheet showAtView:self];
|
||||
[sheet show:^(NSUInteger index) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
@@ -114,6 +135,7 @@
|
||||
//系统
|
||||
[GIGaUserFileHelper delectShareImage:kUSERSHAREA_IMAGENAME];
|
||||
ShareViewController *share = [[ShareViewController alloc] init];
|
||||
share.model = self.model;
|
||||
[self presentViewController:share animated:NO completion:nil];
|
||||
|
||||
}
|
||||
@@ -130,14 +152,14 @@
|
||||
|
||||
}];
|
||||
|
||||
[self.view addSubview:sheet];
|
||||
}
|
||||
|
||||
#pragma mark share
|
||||
-(void)shareBtnAction{
|
||||
|
||||
ShareViewController *share = [[ShareViewController alloc] init];
|
||||
[self presentViewController:share animated:NO completion:nil];
|
||||
share.model = self.model;
|
||||
[self presentViewController:share animated:YES completion:nil];
|
||||
|
||||
}
|
||||
|
||||
@@ -220,6 +242,7 @@
|
||||
[GIGaUserFileHelper savaShareImange:kUSERSHAREA_IMAGENAME image:small];
|
||||
|
||||
ShareViewController *share = [[ShareViewController alloc] init];
|
||||
share.model = self.model;
|
||||
[self presentViewController:share animated:NO completion:nil];
|
||||
}
|
||||
|
||||
@@ -227,5 +250,23 @@
|
||||
[picker dismissViewControllerAnimated:YES completion:nil];
|
||||
}
|
||||
|
||||
-(void)requestshareInfo{
|
||||
|
||||
|
||||
if (self.maskTimeId == nil) {
|
||||
return;
|
||||
}
|
||||
|
||||
GiGaBaseAPiRequest *api = [GiGaBaseAPiRequest initWithRequestPath:kApiShareAction method:RequestPostMethod parms:@{@"id":self.maskTimeId}];
|
||||
[api requstDataWithResult:^(GiGaAPIResult *result){
|
||||
if (result.success) {
|
||||
NSDictionary *dic = result.dic;
|
||||
GiGaShareModel *model = [[GiGaShareModel alloc] initWithDictionary:dic error:nil];
|
||||
self.model = model;
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@@ -46,8 +46,11 @@
|
||||
}
|
||||
|
||||
return _danmuSwitch;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (GiGaFlyingCommitInputView *)commitInputView{
|
||||
|
||||
if (!_commitInputView) {
|
||||
@@ -139,10 +142,10 @@
|
||||
_manager = manager;
|
||||
_client = manager.defaultSocket;
|
||||
[self.manager connect];
|
||||
|
||||
weakify(self);
|
||||
|
||||
[self.client on:@"connect" callback:^(NSArray* data, SocketAckEmitter* ack) {
|
||||
GIGA_WIndowTost(@"客户端上线");
|
||||
//GIGA_WIndowTost(@"客户端上线");
|
||||
NSLog(@"*************\n\niOS客户端上线\n\n*************");
|
||||
}];
|
||||
|
||||
@@ -154,9 +157,11 @@
|
||||
|
||||
[self.client on:@"onTalk" callback:^(NSArray * _Nonnull data, SocketAckEmitter * _Nonnull ack) {
|
||||
|
||||
NSString *json =data[0];
|
||||
NSLog(@"callback json***:%@",json);
|
||||
NSDictionary *dic = [GiGaHelper dictionaryWithJsonString:json];
|
||||
//NSString *json =data[0];
|
||||
//NSDictionary *dic = [GiGaHelper dictionaryWithJsonString:json];
|
||||
NSDictionary *dic = data[0];
|
||||
NSLog(@"callback json***:%@",dic);
|
||||
|
||||
|
||||
if (dic == nil) {
|
||||
NSLog(@"解析失败");
|
||||
@@ -176,15 +181,8 @@
|
||||
|
||||
[self.client on:@"error" callback:^(NSArray * _Nonnull event, SocketAckEmitter * _Nonnull ack) {
|
||||
|
||||
[GIGAMBHUDHelper messageAddto:self.view title:@"连接弹幕"];
|
||||
// NSString *htmlString =event[0];
|
||||
// htmlString = [self htmlEntityDecode:htmlString];
|
||||
//
|
||||
// UIWebView * webView = [[UIWebView alloc]initWithFrame:CGRectMake(20, 300, self.view.frame.size.width - 40, 400)];
|
||||
// [webView loadHTMLString:htmlString baseURL:nil];
|
||||
// [self.view addSubview:webView];
|
||||
//
|
||||
// NSLog(@"*************\n\n%@\n\n*************",event?event[0]:@"");
|
||||
[GIGAMBHUDHelper messageAddto:self.view title:@"连接弹幕中..."];
|
||||
|
||||
GILog(@"请求超时");
|
||||
|
||||
}];
|
||||
|
||||
@@ -33,9 +33,11 @@
|
||||
#import "GiGaBaseAPiRequest.h"
|
||||
#import "MaskTestResultVC.h"
|
||||
#import "GIGaMaskShareViewController.h"
|
||||
#import "MaskHistryRecord.h"
|
||||
#import "MaskTimeTopAnimationView.h"
|
||||
|
||||
|
||||
@interface GiGaMaskTaskViewController ()<MaskCirCularProGressViewDelegate>
|
||||
@interface GiGaMaskTaskViewController ()<MaskCirCularProGressViewDelegate,MaskTimeTextViewDelegate>
|
||||
{
|
||||
AVAudioPlayer *_musicPalyer;
|
||||
}
|
||||
@@ -53,13 +55,28 @@
|
||||
@property(nonatomic,strong) UIButton *startTestButton;
|
||||
//开启弹幕按钮
|
||||
@property(nonatomic,strong) UIButton *openDanmuButton;
|
||||
|
||||
//记录当前面试时间 记录开id
|
||||
@property(nonatomic,copy) NSString *currentMaskId;
|
||||
@property(nonatomic,strong) MaskTimeTopAnimationView *animLabeview;
|
||||
|
||||
@end
|
||||
|
||||
@implementation GiGaMaskTaskViewController
|
||||
|
||||
#pragma mark - property
|
||||
|
||||
- (MaskTimeTopAnimationView *)animLabeview{
|
||||
if (!_animLabeview) {
|
||||
_animLabeview = [[MaskTimeTopAnimationView alloc] initWithFrame:CGRectMake(0,20+ PhoneX_TopMargin,KMainW - 40 * 2, 44)];
|
||||
NSString *text = @"长时间的使用面膜可能会对您的皮肤造成伤害";
|
||||
[_animLabeview animationWithTexts:[NSArray arrayWithObjects:text,@"面膜时间",text, nil]];
|
||||
|
||||
//_animLabeview.backgroundColor = [UIColor blueColor];
|
||||
}
|
||||
|
||||
return _animLabeview;
|
||||
}
|
||||
|
||||
- (UIButton *)openDanmuButton{
|
||||
if (!_openDanmuButton) {
|
||||
_openDanmuButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
@@ -177,7 +194,7 @@
|
||||
|
||||
#pragma mark 弹幕
|
||||
-(void)createInputView{
|
||||
|
||||
self.openDanmuButton.hidden = YES;
|
||||
GiGaFlingCommitVC* GiGaFlingVC = [[GiGaFlingCommitVC alloc] init];
|
||||
if (ISIOS8) {
|
||||
GiGaFlingVC.modalPresentationStyle = UIModalPresentationOverCurrentContext;
|
||||
@@ -228,8 +245,8 @@
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
[super viewDidLoad];
|
||||
[self setUpNav];
|
||||
[self initUI];
|
||||
[self addNotify];
|
||||
@@ -345,12 +362,12 @@
|
||||
#pragma mark 布局
|
||||
-(void)initUI{
|
||||
|
||||
|
||||
self.view.backgroundColor = GIGA_MAIN_BGCOLOR;
|
||||
[self.view addSubview:self.openDanmuButton];
|
||||
[self.view addSubview:self.faceView];
|
||||
[self.view addSubview:self.maskImageView];
|
||||
[self.view addSubview:self.hairImageView];
|
||||
|
||||
//[self.view bringSubviewToFront:self.maskImageView];
|
||||
[self.view addSubview:self.swipeGaurdimagView];
|
||||
[self.view addSubview:self.startMaskButton];
|
||||
@@ -442,7 +459,8 @@
|
||||
|
||||
#pragma mark 开始面膜时间
|
||||
-(void)startMaskTime{
|
||||
|
||||
//记录
|
||||
[self sendBengainMaskTime];
|
||||
[self createInputView]; //出现弹幕
|
||||
AppDelegate *delegate =(AppDelegate *) [[UIApplication sharedApplication] delegate];
|
||||
if (delegate.isMasking) {
|
||||
@@ -450,17 +468,18 @@
|
||||
}
|
||||
delegate.isMasking = YES;
|
||||
[_musicPalyer play];
|
||||
[self setBackGroundPlayingInfo];//锁屏音频信息
|
||||
//[self setBackGroundPlayingInfo];//锁屏音频信息
|
||||
|
||||
//总时间隔 s
|
||||
NSTimeInterval timeInterVal = [GiGaUserDefault getUserMaskeTime];
|
||||
//NSTimeInterval timeInterVal = [GiGaUserDefault getUserMaskeTime];
|
||||
NSTimeInterval timeInterVal = 6;
|
||||
[self.cicleProgressView startWith:timeInterVal];
|
||||
|
||||
//底部弹窗
|
||||
[self showWaringView];
|
||||
|
||||
//app 前台时收到本地通知showAlert 后台时通知提醒
|
||||
[[GiGaLocalNotificationManager localNotifiationCenter] sendLocalNotification:@"本地推送" fireTimeInterval:timeInterVal alertAction:@"测试面膜时间" withIdentifier:kLOCALNotifiID_MASKETIMEEND];
|
||||
// [[GiGaLocalNotificationManager localNotifiationCenter] sendLocalNotification:@"本地推送" fireTimeInterval:timeInterVal alertAction:@"测试面膜时间" withIdentifier:kLOCALNotifiID_MASKETIMEEND];
|
||||
|
||||
}
|
||||
|
||||
@@ -506,8 +525,8 @@
|
||||
#pragma mark 面膜时间结束
|
||||
-(void)maskTimeEnd{
|
||||
|
||||
[self sendEndMaskTime];
|
||||
NC_POST_NAME_OBJECT(kUserNoti_MASKEND, nil);
|
||||
|
||||
//面膜时间结束时设置 全局变量 不再发送本地通知 提醒
|
||||
AppDelegate *delegate =(AppDelegate *) [[UIApplication sharedApplication] delegate];
|
||||
delegate.isMasking = NO;
|
||||
@@ -579,6 +598,7 @@
|
||||
}
|
||||
|
||||
-(void)dealloc{
|
||||
|
||||
NC_REMOVE_NAME(self, USER_GUARD_DISSMISS, nil);
|
||||
NC_REMOVE_NAME(self, APP_GUARD_DISSMISS, nil);
|
||||
NC_REMOVE_NAME(self, APP_PUSHTO_DETAILVIEW, nil);
|
||||
@@ -586,7 +606,6 @@
|
||||
NC_REMOVE_NAME(self, kUserLogOutNotify, nil);
|
||||
NC_REMOVE_NAME(self, kUserLoginSuccessNoti, nil);
|
||||
NC_REMOVE_NAME(self, @"UserCloseChatRoomAction", nil);
|
||||
|
||||
}
|
||||
|
||||
#pragma mark 新手引导
|
||||
@@ -612,12 +631,12 @@
|
||||
#pragma mark - 导航按钮
|
||||
-(void)setUpNav{
|
||||
//leftItem
|
||||
// UIButton *leftBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
// leftBtn.frame = CGRectMake(0, 0, 40, 40);
|
||||
// leftBtn.backgroundColor = [UIColor redColor];
|
||||
// [leftBtn setImage:[UIImage imageNamed:@"btn_back"] forState:UIControlStateNormal];
|
||||
// [leftBtn addTarget:self action:@selector(leftBtnAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
// self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:leftBtn];
|
||||
UIButton *leftBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
leftBtn.frame = CGRectMake(0, 0, 40, 40);
|
||||
//leftBtn.backgroundColor = [UIColor redColor];
|
||||
//[leftBtn setImage:[UIImage imageNamed:@"btn_back"] forState:UIControlStateNormal];
|
||||
//[leftBtn addTarget:self action:@selector(leftBtnAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:leftBtn];
|
||||
|
||||
//rightItem
|
||||
UIButton *rightBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
@@ -647,6 +666,8 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
self.navigationController.navigationBar.backgroundColor = [UIColor whiteColor];
|
||||
}
|
||||
|
||||
#pragma mark 用户头像更新
|
||||
@@ -746,23 +767,30 @@
|
||||
|
||||
-(void)showAlertGoShareMaskTime{
|
||||
|
||||
[self jxt_showAlertWithTitle:@"面膜时间" message:@"去分享我的面膜时间" appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
|
||||
alertMaker.addActionCancelTitle(@"下次");
|
||||
alertMaker.addActionDefaultTitle(@"去分享");
|
||||
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
|
||||
if (self.currentMaskId == nil) {
|
||||
return;
|
||||
}
|
||||
BOOL isUserLogin = [GiGaUserDefault isUserLogin];
|
||||
if (isUserLogin) {
|
||||
//游客不分享
|
||||
[self jxt_showAlertWithTitle:@"面膜时间" message:@"去分享我的面膜时间" appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
|
||||
alertMaker.addActionCancelTitle(@"下次");
|
||||
alertMaker.addActionDefaultTitle(@"去分享");
|
||||
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
|
||||
|
||||
if (buttonIndex == 1) {
|
||||
if (buttonIndex == 1) {
|
||||
|
||||
GIGaMaskShareViewController *shareVC = [[GIGaMaskShareViewController alloc] init];
|
||||
[self.navigationController pushViewController:shareVC animated:YES];;
|
||||
GIGaMaskShareViewController *shareVC = [[GIGaMaskShareViewController alloc] init];
|
||||
shareVC.maskTimeId = self.currentMaskId;
|
||||
[self.navigationController pushViewController:shareVC animated:YES];
|
||||
}
|
||||
}];
|
||||
|
||||
}
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - 开启弹幕按钮事件
|
||||
-(void)openDanmuButtonAction{
|
||||
self.openDanmuButton.hidden = YES;
|
||||
[self createInputView];
|
||||
}
|
||||
//通知用户挂断弹幕
|
||||
@@ -770,4 +798,43 @@
|
||||
self.openDanmuButton.hidden = NO;
|
||||
}
|
||||
|
||||
#pragma mark 开始敷面膜 APi
|
||||
-(void)sendBengainMaskTime{
|
||||
|
||||
BOOL isUserLogin = [GiGaUserDefault isUserLogin];
|
||||
if (isUserLogin) {
|
||||
NSTimeInterval timeInterVal = [GiGaUserDefault getUserMaskeTime];
|
||||
NSString *minute = [NSString stringWithFormat:@"%.f",timeInterVal /60];
|
||||
GiGaBaseAPiRequest *api = [GiGaBaseAPiRequest initWithRequestPath:KApiBeginMaskTime method:RequestPostMethod parms:@{@"minute":minute}];
|
||||
[api requstDataWithResult:^(GiGaAPIResult *result) {
|
||||
if (result.success) {
|
||||
NSDictionary *maskDic = result.dic[@"maskUseLog"];
|
||||
self.currentMaskId = maskDic[@"id"];
|
||||
}
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark 结束敷面膜 APi
|
||||
-(void)sendEndMaskTime{
|
||||
|
||||
BOOL isUserLogin = [GiGaUserDefault isUserLogin];
|
||||
if (isUserLogin) {
|
||||
if (self.currentMaskId) {
|
||||
GiGaBaseAPiRequest *api = [GiGaBaseAPiRequest initWithRequestPath:kApiEndMaskTime method:RequestPostMethod parms:@{@"id":self.currentMaskId}];
|
||||
[api requstDataWithResult:^(GiGaAPIResult *result) {
|
||||
if (result.success) {
|
||||
GILog(@"%@",@"面膜时间APi结束");
|
||||
|
||||
}
|
||||
}];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-(void)addNavTitile:(NSString *)title{
|
||||
self.navigationItem.titleView = self.animLabeview;
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -7,7 +7,9 @@
|
||||
//
|
||||
|
||||
#import "GiGaBaseViewController.h"
|
||||
#import "GiGaShareModel.h"
|
||||
|
||||
@interface ShareViewController : GiGaBaseViewController
|
||||
@property(nonatomic,strong) GiGaShareModel *model;
|
||||
|
||||
@end
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
#import <WXApiObject.h>
|
||||
#import <WXApi.h>
|
||||
#import "UIImage+ShotImage.h"
|
||||
#import "GiGaBaseAPiRequest.h"
|
||||
#import "UIImageView+WebCache.h"
|
||||
|
||||
@interface ShareViewController ()<UITableViewDelegate,UITableViewDataSource,UIImagePickerControllerDelegate,UINavigationControllerDelegate>
|
||||
@property(nonatomic,strong) UITableView *tab;
|
||||
@@ -37,7 +39,7 @@
|
||||
|
||||
|
||||
UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
backBtn.frame = CGRectMake(20,44, 40, 40);
|
||||
backBtn.frame = CGRectMake(20,20 +PhoneX_TopMargin, 40, 40);
|
||||
[backBtn setImage:[UIImage imageNamed:@"btn_moment_back"] forState:UIControlStateNormal];
|
||||
|
||||
[backBtn addTarget:self action:@selector(backBtnAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
@@ -46,6 +48,12 @@
|
||||
|
||||
[self creatBtns];
|
||||
|
||||
NC_ADD_TARGET_NAME_OBJECT(self, @selector(usershareSuccessNoti), NC_UseShareSuccessNoti, nil);
|
||||
|
||||
}
|
||||
|
||||
-(void)dealloc{
|
||||
NC_REMOVE_NAME(self, NC_UseShareSuccessNoti, nil);
|
||||
}
|
||||
|
||||
-(void)creatTabUI{
|
||||
@@ -84,12 +92,23 @@
|
||||
cell = [[[NSBundle mainBundle] loadNibNamed:@"MaskTimeShareViewCell" owner:self options:nil] lastObject];
|
||||
|
||||
}
|
||||
|
||||
return cell;
|
||||
}else if (indexPath.row == 1){
|
||||
MaskShareTimeMidViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MaskShareTimeMidViewCell"];
|
||||
if (!cell) {
|
||||
cell = [[[NSBundle mainBundle] loadNibNamed:@"MaskShareTimeMidViewCell" owner:self options:nil] lastObject];
|
||||
if (self.model) {
|
||||
cell.timeLabe.text = self.model.minute;
|
||||
CGFloat percent = [self.model.exquisite floatValue];
|
||||
int perrr = percent * 100;
|
||||
NSString *per = [NSString stringWithFormat:@"%d",perrr];
|
||||
cell.percetLabe.text = per;
|
||||
cell.totalLabe.text = self.model.totalMaskNum;
|
||||
NSURL *url = [NSURL URLWithString:self.model.headImgUrl];
|
||||
[cell.userAvtoar sd_setImageWithURL:url placeholderImage:[UIImage imageNamed:@"nav_circle_avatar"]];
|
||||
|
||||
}
|
||||
}
|
||||
return cell;
|
||||
}
|
||||
@@ -161,7 +180,8 @@
|
||||
//更换背景
|
||||
-(void)changeAction{
|
||||
|
||||
MaskTimeShareActionSheet * sheet = [[MaskTimeShareActionSheet alloc] initWithFrame:CGRectMake(0, 0, KMainW, KMainH)];
|
||||
MaskTimeShareActionSheet * sheet = [MaskTimeShareActionSheet showAtView:self];
|
||||
|
||||
[sheet show:^(NSUInteger index) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
@@ -176,10 +196,24 @@
|
||||
if (self->_curentImageIndex == 4) {
|
||||
self->_curentImageIndex = 0;
|
||||
}
|
||||
NSArray *images = @[@"sharebg_2",@"sharebg_3",@"sharebg_4",@"sharebg_5",@"sharebg_1"];
|
||||
NSArray *images = @[@"sharebg_1",@"sharebg_2",@"sharebg_3",@"sharebg_4",@"sharebg_5"];
|
||||
|
||||
[self.backimageview setImage:[UIImage imageNamed: images[self->_curentImageIndex]]];
|
||||
|
||||
MaskTimeShareViewCell *cell = [self.tab cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]];
|
||||
|
||||
if (self.curentImageIndex==0) {
|
||||
cell.shareLabe.image = [UIImage imageNamed:@"share_oneblack"];
|
||||
cell.doinglabel.textColor = [UIColor blackColor];
|
||||
}
|
||||
|
||||
if (self.curentImageIndex == 1) {
|
||||
cell.shareLabe.image = [UIImage imageNamed:@"share_one"];
|
||||
cell.doinglabel.textColor = GIGARGB(170, 170, 170, 1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
@@ -194,8 +228,6 @@
|
||||
|
||||
}];
|
||||
|
||||
[self.view addSubview:sheet];
|
||||
|
||||
}
|
||||
|
||||
#pragma mark 相册
|
||||
@@ -307,6 +339,7 @@
|
||||
// 朋友圈
|
||||
[self shareImagToWX:image scene:WXSceneTimeline];
|
||||
}
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
@@ -330,4 +363,10 @@
|
||||
[WXApi sendReq:req];
|
||||
}
|
||||
|
||||
//分享成功
|
||||
-(void)usershareSuccessNoti{
|
||||
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@@ -74,10 +74,11 @@
|
||||
CGFloat navH = SAFE_NAV_HEIGHT;
|
||||
|
||||
UIButton *numberBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[numberBtn setBackgroundImage:[UIImage imageNamed:@"ceshi_number"] forState:UIControlStateNormal];
|
||||
NSAttributedString *numbertitle = [[NSAttributedString alloc] initWithString:@"1" attributes:@{NSFontAttributeName:[UIFont boldSystemFontOfSize:18],NSForegroundColorAttributeName:[UIColor whiteColor]}];
|
||||
|
||||
[numberBtn setAttributedTitle:numbertitle forState:UIControlStateNormal];
|
||||
[numberBtn setBackgroundImage:[UIImage imageNamed:@"result_logo"] forState:UIControlStateNormal];
|
||||
// NSAttributedString *numbertitle = [[NSAttributedString alloc] initWithString:@"1" attributes:@{NSFontAttributeName:[UIFont boldSystemFontOfSize:18],NSForegroundColorAttributeName:[UIColor whiteColor]}];
|
||||
//
|
||||
//
|
||||
// [numberBtn setAttributedTitle:numbertitle forState:UIControlStateNormal];
|
||||
self.numberBtn = numberBtn;
|
||||
[self.view addSubview:numberBtn];
|
||||
|
||||
@@ -85,16 +86,20 @@
|
||||
titleLabel.text = @"悄悄地告诉你小优的年龄区间是?";
|
||||
titleLabel.font = [UIFont fontWithName:GIGA_FONTBOLD size:16];
|
||||
titleLabel.textColor = GIGARGB(63, 63, 63, 1);
|
||||
titleLabel.numberOfLines = 2;
|
||||
self.questionlabel = titleLabel;
|
||||
[titleLabel sizeToFit];
|
||||
[self.view addSubview:titleLabel];
|
||||
|
||||
UILabel *descLabel = [[UILabel alloc] init];
|
||||
descLabel.text = @"精准的选择,让小优更好的为您挑选最符合您的肤质的面膜";
|
||||
descLabel.font = [UIFont fontWithName:GIGA_FONTNAME size:12];
|
||||
descLabel.textColor = GIGARGB(208, 208, 208, 1);
|
||||
descLabel.numberOfLines = 0;
|
||||
|
||||
descLabel.numberOfLines = 3;
|
||||
descLabel.textAlignment = NSTextAlignmentCenter;
|
||||
self.descLabel = descLabel;
|
||||
[descLabel sizeToFit];
|
||||
[self.view addSubview:descLabel];
|
||||
|
||||
[numberBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -108,14 +113,14 @@
|
||||
|
||||
make.left.mas_equalTo(numberBtn.mas_right).offset(12);
|
||||
make.centerY.mas_equalTo(numberBtn.mas_centerY);
|
||||
make.right.mas_equalTo(self.view.mas_right).offset(-53);
|
||||
|
||||
|
||||
}];
|
||||
|
||||
[descLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(numberBtn.mas_right).offset(12);
|
||||
make.top.mas_equalTo(titleLabel.mas_bottom).offset(20);
|
||||
make.right.mas_equalTo(self.view.mas_right).offset(-89);
|
||||
make.right.mas_equalTo(self.view.mas_right).offset(-50);
|
||||
|
||||
}];
|
||||
|
||||
@@ -305,9 +310,9 @@
|
||||
-(void)reloadViews{
|
||||
|
||||
//刷新问题相关数据
|
||||
NSAttributedString *numbertitle = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"%ld",(long)_page] attributes:@{NSFontAttributeName:[UIFont boldSystemFontOfSize:18],NSForegroundColorAttributeName:[UIColor whiteColor]}];
|
||||
|
||||
[_numberBtn setAttributedTitle:numbertitle forState:UIControlStateNormal];
|
||||
// NSAttributedString *numbertitle = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"%ld",(long)_page] attributes:@{NSFontAttributeName:[UIFont boldSystemFontOfSize:18],NSForegroundColorAttributeName:[UIColor whiteColor]}];
|
||||
//
|
||||
// [_numberBtn setAttributedTitle:numbertitle forState:UIControlStateNormal];
|
||||
|
||||
self.questionlabel.text = [NSString stringWithFormat:@"%@",_currentModel.question];
|
||||
self.descLabel.text = _currentModel.remark;
|
||||
@@ -343,7 +348,7 @@
|
||||
|
||||
[self saveProgress];
|
||||
if (_page == self.questonArray.count ) {
|
||||
GIGA_ShowToast(@"没有了");
|
||||
//GIGA_ShowToast(@"没有了");
|
||||
[self submitAnswer];
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#import "GiGaFileNanager.h"
|
||||
#import <WXApi.h>
|
||||
#import "MaskTestResult.h"
|
||||
#import "MaskTestNODataViewCell.h"
|
||||
|
||||
@interface MaskTestResultVC ()
|
||||
|
||||
@@ -42,11 +43,18 @@
|
||||
[self.tableView registerClass:[MaskResultMinViewCell class] forCellReuseIdentifier:@"MaskResultMinViewCell"];
|
||||
[self.tableView registerClass:[MaskResultShareViewCell class] forCellReuseIdentifier:@"MaskResultShareViewCell"];
|
||||
|
||||
|
||||
|
||||
if (!self.model) {
|
||||
[self addNavTitile:@"历史测试"];
|
||||
[self requstLatestTestData];
|
||||
}
|
||||
|
||||
NC_ADD_TARGET_NAME_OBJECT(self, @selector(usershareSuccessNoti), NC_UseShareSuccessNoti, nil);
|
||||
}
|
||||
|
||||
-(void)dealloc{
|
||||
NC_REMOVE_NAME(self, NC_UseShareSuccessNoti, nil);
|
||||
}
|
||||
|
||||
-(void)requstLatestTestData{
|
||||
@@ -75,11 +83,24 @@
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
|
||||
if (self.model == nil) {
|
||||
return 1;
|
||||
}
|
||||
return 3;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
|
||||
if (self.model == nil) {
|
||||
MaskTestNODataViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MaskTestNODataViewCell"];
|
||||
if(!cell){
|
||||
cell = [[[NSBundle mainBundle] loadNibNamed:@"MaskTestNODataViewCell" owner:self options:nil] lastObject];
|
||||
|
||||
}
|
||||
[cell.testBtn addTarget:self action:@selector(testBtnAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
return cell;
|
||||
}
|
||||
|
||||
if (indexPath.row == 0) {
|
||||
static NSString *cellID = @"MaskResultPercentCell";
|
||||
MaskResultPercentCell *cell =[tableView dequeueReusableCellWithIdentifier:cellID];
|
||||
@@ -114,6 +135,10 @@
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
|
||||
if (self.model == nil) {
|
||||
return 255;
|
||||
}
|
||||
CGFloat viewH = KMainH - SAFE_NAV_HEIGHT;
|
||||
CGFloat cellH = viewH / 3 ;
|
||||
return cellH;
|
||||
@@ -182,6 +207,15 @@
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
//分享成功
|
||||
-(void)usershareSuccessNoti{
|
||||
|
||||
}
|
||||
|
||||
-(void)testBtnAction{
|
||||
[self.navigationController popToRootViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
NSArray *colorArr = @[(id)[[UIColor colorWithHex:0xFFFFFF] CGColor],
|
||||
(id)[[UIColor colorWithHex:0xFFF3E4] CGColor],
|
||||
(id)[[UIColor colorWithHex:0x9A9996] CGColor]];
|
||||
(id)[[UIColor colorWithHex:0xFBC37B] CGColor]];
|
||||
NSArray *colorLocationArray = @[@0.0, @0.5, @1];
|
||||
CAGradientLayer * gradientLayer = [CAGradientLayer layer];
|
||||
gradientLayer.frame = self.bounds;
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// MaskTestNODataViewCell.h
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/26.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface MaskTestNODataViewCell : UITableViewCell
|
||||
@property (weak, nonatomic) IBOutlet UIButton *testBtn;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// MaskTestNODataViewCell.m
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/26.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MaskTestNODataViewCell.h"
|
||||
|
||||
@implementation MaskTestNODataViewCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
self.testBtn.layer.masksToBounds = YES;
|
||||
self.testBtn.layer.cornerRadius = self.testBtn.frame.size.height /2 ;
|
||||
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,60 @@
|
||||
<?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="none" indentationWidth="10" reuseIdentifier="MaskTestNODataViewCell" id="KGk-i7-Jjw" customClass="MaskTestNODataViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="255"/>
|
||||
<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="320" height="254.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Lm9-j5-N2R">
|
||||
<rect key="frame" x="97" y="115" width="126" height="65"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="65" id="38X-Cc-rhW"/>
|
||||
<constraint firstAttribute="width" constant="126" id="d9e-ST-XY6"/>
|
||||
</constraints>
|
||||
<string key="text">还没有测试记录
|
||||
快测测肤质吧</string>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Semibold" family="PingFang SC" pointSize="18"/>
|
||||
<color key="textColor" red="0.41568627450000001" green="0.41568627450000001" blue="0.41568627450000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="SPr-Bd-mHF">
|
||||
<rect key="frame" x="94" y="196" width="132" height="41"/>
|
||||
<color key="backgroundColor" red="0.70980392160000005" green="0.054901960780000002" blue="0.054901960780000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="132" id="mEU-iC-bBa"/>
|
||||
<constraint firstAttribute="height" constant="41" id="szc-TX-R5l"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Semibold" family="PingFang SC" pointSize="18"/>
|
||||
<state key="normal" title="测试肤质"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="Lm9-j5-N2R" firstAttribute="centerX" secondItem="H2p-sc-9uM" secondAttribute="centerX" id="5RG-7U-vcz"/>
|
||||
<constraint firstItem="SPr-Bd-mHF" firstAttribute="top" secondItem="Lm9-j5-N2R" secondAttribute="bottom" constant="16" id="ULk-kk-GV7"/>
|
||||
<constraint firstItem="Lm9-j5-N2R" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="115" id="aYP-OA-woj"/>
|
||||
<constraint firstItem="SPr-Bd-mHF" firstAttribute="centerX" secondItem="H2p-sc-9uM" secondAttribute="centerX" id="gJY-SL-6hY"/>
|
||||
<constraint firstAttribute="bottom" secondItem="SPr-Bd-mHF" secondAttribute="bottom" constant="17.5" id="iso-5M-RBe"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
|
||||
<connections>
|
||||
<outlet property="testBtn" destination="SPr-Bd-mHF" id="t1Y-Ap-CkT"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="34" y="53.5"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
</document>
|
||||
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// GiGaShareModel.h
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/26.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import <JSONModel/JSONModel.h>
|
||||
|
||||
@interface GiGaShareModel : JSONModel
|
||||
|
||||
@property(nonatomic,copy) NSString *exquisite;
|
||||
@property(nonatomic,copy) NSString *exquisitePercent;
|
||||
@property(nonatomic,copy) NSString *headImgUrl;
|
||||
@property(nonatomic,copy) NSString *minute;
|
||||
@property(nonatomic,copy) NSString *monthMaskNum;
|
||||
@property(nonatomic,copy) NSString *msg;
|
||||
@property(nonatomic,copy) NSString *totalMaskNum;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// GiGaShareModel.m
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/26.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import "GiGaShareModel.h"
|
||||
|
||||
@implementation GiGaShareModel
|
||||
|
||||
+ (BOOL)propertyIsOptional:(NSString *)propertyName{
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -25,7 +25,8 @@
|
||||
self.frame = CGRectMake(0, 0, 0, height);
|
||||
_msgModel = model;
|
||||
//self.backgroundColor = [[UIColor blackColor]colorWithAlphaComponent:0.5];
|
||||
self.backgroundColor = [UIColor redColor];
|
||||
//self.backgroundColor = [UIColor redColor];
|
||||
|
||||
[self initUI];
|
||||
}
|
||||
return self;
|
||||
@@ -40,43 +41,48 @@
|
||||
|
||||
-(void)initUI{
|
||||
|
||||
UIImageView *avatar = [[UIImageView alloc] init];
|
||||
avatar.layer.masksToBounds = YES;
|
||||
avatar.layer.cornerRadius = 15;
|
||||
[self addSubview:avatar];
|
||||
[avatar sd_setImageWithURL:[NSURL URLWithString:_msgModel.sendUserHeadImg] placeholderImage:[UIImage imageNamed:@"nav_circle_avatar"]];
|
||||
self.userAvtar = avatar;
|
||||
[self.userAvtar mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(30);
|
||||
make.height.mas_equalTo(30);
|
||||
make.left.mas_equalTo(self.mas_left).mas_offset(3);
|
||||
make.top.mas_equalTo(self.mas_top).mas_offset(3);
|
||||
|
||||
}];
|
||||
// UIImageView *avatar = [[UIImageView alloc] init];
|
||||
// avatar.layer.masksToBounds = YES;
|
||||
// avatar.layer.cornerRadius = 15;
|
||||
// [self addSubview:avatar];
|
||||
// [avatar sd_setImageWithURL:[NSURL URLWithString:_msgModel.sendUserHeadImg] placeholderImage:[UIImage imageNamed:@"nav_circle_avatar"]];
|
||||
// self.userAvtar = avatar;
|
||||
// [self.userAvtar mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.width.mas_equalTo(30);
|
||||
// make.height.mas_equalTo(30);
|
||||
// make.left.mas_equalTo(self.mas_left).mas_offset(3);
|
||||
// make.top.mas_equalTo(self.mas_top).mas_offset(3);
|
||||
//
|
||||
// }];
|
||||
|
||||
UILabel *namelabel = [[UILabel alloc] init];
|
||||
namelabel.font = [UIFont systemFontOfSize:14];
|
||||
namelabel.textColor = [UIColor blackColor];
|
||||
namelabel.font = GIGA_TEXTFONTBOLD(15);
|
||||
namelabel.textColor = [UIColor whiteColor];
|
||||
//namelabel.frame= CGRectMake(CGRectGetMaxX(avatar.frame) + 5, 4, namelabel.frame.size.width, namelabel.frame.size.height);
|
||||
namelabel.text = @"用户名";
|
||||
namelabel.text = @"用户名:";
|
||||
if (_msgModel.sendUserName && _msgModel.sendUserName.length > 0) {
|
||||
namelabel.text = [_msgModel.sendUserName replaceUnicode:_msgModel.sendUserName];
|
||||
namelabel.text = [NSString stringWithFormat:@"%@:",_msgModel.sendUserName];
|
||||
}
|
||||
[namelabel sizeToFit];
|
||||
self.userName = namelabel;
|
||||
[self addSubview:self.userName];
|
||||
[self.userName mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// [self.userName mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
//
|
||||
// make.left.mas_equalTo(self.userAvtar.mas_right).mas_offset(3);
|
||||
// make.top.mas_equalTo(self.mas_top).mas_offset(10);
|
||||
//
|
||||
// }];
|
||||
|
||||
make.left.mas_equalTo(self.userAvtar.mas_right).mas_offset(3);
|
||||
make.top.mas_equalTo(self.mas_top).mas_offset(10);
|
||||
[self.userName mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.mas_left).offset(3);
|
||||
make.centerY.mas_equalTo(self.mas_centerY);
|
||||
|
||||
}];
|
||||
|
||||
UILabel *msglabel = [[UILabel alloc] init];
|
||||
msglabel.font = [UIFont systemFontOfSize:13];
|
||||
msglabel.textColor = [UIColor blackColor];
|
||||
msglabel.font = GIGA_TEXTFONTMEDIUM(13);
|
||||
msglabel.textColor = [UIColor whiteColor];
|
||||
|
||||
//msglabel.frame= CGRectMake(namelabel.frame.origin.x, CGRectGetMaxY(avatar.frame) - msglabel.frame.size.height - namelabel.frame.origin.y, msglabel.frame.size.width, msglabel.frame.size.height);
|
||||
msglabel.text = @"信息内容";
|
||||
if (_msgModel.content && _msgModel.content.length > 0) {
|
||||
msglabel.text = [_msgModel.content replaceUnicode:_msgModel.content];
|
||||
@@ -84,17 +90,25 @@
|
||||
self.msg = msglabel;
|
||||
[msglabel sizeToFit];
|
||||
[self addSubview:self.msg];
|
||||
// [self.msg mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
//
|
||||
// make.top.mas_equalTo(self.userAvtar.mas_bottom).mas_offset(3);
|
||||
// make.left.mas_equalTo(self.mas_left).mas_offset(5);
|
||||
//
|
||||
// }];
|
||||
|
||||
[self.msg mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
|
||||
make.top.mas_equalTo(self.userAvtar.mas_bottom).mas_offset(3);
|
||||
make.left.mas_equalTo(self.mas_left).mas_offset(5);
|
||||
|
||||
make.left.mas_equalTo(namelabel.mas_right).offset(2);
|
||||
make.centerY.mas_equalTo(self.mas_centerY);
|
||||
}];
|
||||
[self layoutIfNeeded];
|
||||
|
||||
float width = msglabel.frame.size.width > namelabel.frame.size.width ? msglabel.frame.size.width:namelabel.frame.size.width ;
|
||||
// float width = msglabel.frame.size.width > namelabel.frame.size.width ? msglabel.frame.size.width:namelabel.frame.size.width ;
|
||||
float width = msglabel.frame.size.width + namelabel.frame.size.width;
|
||||
|
||||
self.frame = CGRectMake(0, 0, namelabel.frame.origin.x + 10 + width, self.frame.size.height);
|
||||
self.frame = CGRectMake(0, 0, width, self.frame.size.height);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@@ -16,7 +16,10 @@
|
||||
}
|
||||
-(void)comfirmTitles:(NSIndexPath *)indepath
|
||||
{
|
||||
NSArray *titles = @[@"手机相册",@"系统相册",@"自拍"];
|
||||
NSArray *titles = @[@"手机相册",@"系统相册",@"自拍",@"取消"];
|
||||
if (indepath.row == 3) {
|
||||
self.sheetTitle.textColor = GIGARGB(165,165, 165, 1);
|
||||
}
|
||||
self.sheetTitle.text = titles[indepath.row];
|
||||
|
||||
}
|
||||
|
||||
@@ -14,5 +14,6 @@
|
||||
@property (weak, nonatomic) IBOutlet UILabel *timeLabe;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *percetLabe;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *totalLabe;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *userAvtoar;
|
||||
|
||||
@end
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
self.timeBackVIew.layer.shadowOffset = CGSizeMake(2,1);
|
||||
self.timeBackVIew.layer.shadowColor = GIGARGB(91, 91, 91, 0.6).CGColor;
|
||||
self.timeBackVIew.layer.shadowOpacity = 0.8;
|
||||
self.userAvtoar.layer.masksToBounds = YES;
|
||||
self.userAvtoar.layer.cornerRadius = 4;
|
||||
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
|
||||
@@ -178,6 +178,7 @@
|
||||
<outlet property="timeBackVIew" destination="H7C-wU-YeM" id="q2o-NG-UKS"/>
|
||||
<outlet property="timeLabe" destination="znk-jF-QRT" id="pii-LG-rfu"/>
|
||||
<outlet property="totalLabe" destination="ZJ1-li-JLb" id="MeX-lM-Wfv"/>
|
||||
<outlet property="userAvtoar" destination="ocM-SZ-rcr" id="buS-pJ-uPg"/>
|
||||
<outlet property="userIcon" destination="ocM-SZ-rcr" id="VxR-wi-5fs"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="34" y="53.5"/>
|
||||
|
||||
@@ -7,9 +7,13 @@
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
|
||||
typedef void (^actionSheetAction)(NSUInteger index);
|
||||
@interface MaskTimeShareActionSheet : UIView
|
||||
@interface MaskTimeShareActionSheet : UIViewController
|
||||
@property(nonatomic,copy) actionSheetAction action;
|
||||
-(void)show:(actionSheetAction)action;
|
||||
|
||||
+(MaskTimeShareActionSheet *)showAtView:(UIViewController *)vc;
|
||||
|
||||
@end
|
||||
|
||||
@@ -15,58 +15,55 @@
|
||||
|
||||
@implementation MaskTimeShareActionSheet
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.3]; ;
|
||||
[self creatUI];
|
||||
}
|
||||
return self;
|
||||
|
||||
- (void)viewDidLoad{
|
||||
[super viewDidLoad];
|
||||
self.view.backgroundColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.4];
|
||||
[self creatUI];
|
||||
}
|
||||
|
||||
-(void)creatUI{
|
||||
|
||||
|
||||
|
||||
UIView *holdview =[[UIView alloc] init];
|
||||
holdview.frame =CGRectMake(0,KMainH - 216 - 60 -20 , KMainW, 216 + 60 +20);
|
||||
holdview.backgroundColor = [UIColor whiteColor];
|
||||
// CGRect backRect= holdview.frame;
|
||||
//
|
||||
holdview.frame =CGRectMake(0,KMainH - 216 , KMainW, 216);
|
||||
holdview.backgroundColor = [UIColor whiteColor];
|
||||
//CGRect backRect= holdview.frame;
|
||||
|
||||
// UIBezierPath *maskPath=[UIBezierPath bezierPathWithRoundedRect:backRect byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(15, 15)];
|
||||
// CAShapeLayer *maskLayer =[[CAShapeLayer alloc] init];
|
||||
// maskLayer.frame = backRect;
|
||||
// maskLayer.path = maskPath.CGPath;
|
||||
// holdview.layer.mask = maskLayer;
|
||||
holdview.layer.masksToBounds = YES;
|
||||
holdview.layer.cornerRadius = 10;
|
||||
[self addSubview:holdview];
|
||||
// holdview.layer.masksToBounds = YES;
|
||||
// holdview.layer.cornerRadius = 10;
|
||||
[self.view addSubview:holdview];
|
||||
|
||||
self.tabview = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, KMainW, 216 + 60) style:UITableViewStylePlain];
|
||||
self.tabview = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, KMainW, 216) style:UITableViewStylePlain];
|
||||
self.tabview.backgroundColor = [UIColor whiteColor];
|
||||
self.tabview.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
self.tabview.delegate = self;
|
||||
self.tabview.scrollEnabled = NO;
|
||||
self.tabview.dataSource = self;
|
||||
|
||||
UIButton *cancleBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[cancleBtn setTitle:@"取消" forState:UIControlStateNormal];
|
||||
[cancleBtn setTitleColor:GIGARGB(165,165, 165, 1) forState:UIControlStateNormal];
|
||||
[cancleBtn addTarget:self action:@selector(cancelAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
cancleBtn.frame = CGRectMake(0,1, KMainW,60);
|
||||
|
||||
self.tabview.tableFooterView = cancleBtn;
|
||||
[holdview addSubview:self.tabview];
|
||||
|
||||
}
|
||||
|
||||
|
||||
+(MaskTimeShareActionSheet *)showAtView:(UIViewController *)vc{
|
||||
MaskTimeShareActionSheet *Sheet = [[MaskTimeShareActionSheet alloc] init];
|
||||
if (ISIOS8) {
|
||||
Sheet.modalPresentationStyle = UIModalPresentationOverCurrentContext;
|
||||
}else{
|
||||
Sheet.modalPresentationStyle = UIModalPresentationCurrentContext;
|
||||
}
|
||||
[vc presentViewController:Sheet animated:YES completion:nil];
|
||||
return Sheet;
|
||||
}
|
||||
|
||||
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
|
||||
|
||||
return 3;
|
||||
return 4;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
@@ -82,11 +79,16 @@
|
||||
return 54;
|
||||
}
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
|
||||
if (self.action) {
|
||||
self.action(indexPath.row);
|
||||
if (indexPath.row == 3) {
|
||||
[self cancleDissmiss];
|
||||
}else{
|
||||
[self cancleDissmiss];
|
||||
if (self.action) {
|
||||
self.action(indexPath.row);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-(void)show:(actionSheetAction)action{
|
||||
@@ -106,10 +108,8 @@
|
||||
}
|
||||
|
||||
-(void)cancleDissmiss{
|
||||
[UIView animateWithDuration:1.0 animations:^{
|
||||
self.tabview.frame = CGRectMake(0, KMainH - 216, KMainW, 0);
|
||||
}];
|
||||
[self removeFromSuperview];
|
||||
|
||||
[self dismissViewControllerAnimated:NO completion:nil];
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -9,5 +9,7 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface MaskTimeShareViewCell : UITableViewCell
|
||||
@property (weak, nonatomic) IBOutlet UILabel *doinglabel;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *shareLabe;
|
||||
|
||||
@end
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<constraint firstAttribute="height" constant="35" id="zzS-Dk-zsi"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="share_one" translatesAutoresizingMaskIntoConstraints="NO" id="dlk-Er-Voj">
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="share_oneblack" translatesAutoresizingMaskIntoConstraints="NO" id="dlk-Er-Voj">
|
||||
<rect key="frame" x="42" y="229" width="162" height="19"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="19" id="JLN-Jh-Gue"/>
|
||||
@@ -63,12 +63,16 @@
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
|
||||
<connections>
|
||||
<outlet property="doinglabel" destination="ajv-9T-Bcf" id="Le0-Q8-0zg"/>
|
||||
<outlet property="shareLabe" destination="dlk-Er-Voj" id="iWt-Wf-6y7"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="34" y="53.5"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="share_logo" width="185" height="85"/>
|
||||
<image name="share_one" width="133" height="17"/>
|
||||
<image name="share_oneblack" width="133" height="17"/>
|
||||
<image name="share_two" width="155" height="35"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
<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="这是您敷面膜的第:10次" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="o4N-kZ-Uph">
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="这是您敷面膜的第:10张" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="o4N-kZ-Uph">
|
||||
<rect key="frame" x="193" y="17" width="111" height="14"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="10"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
|
||||
@@ -19,33 +19,44 @@
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="89.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Gqo-NQ-qFy">
|
||||
<rect key="frame" x="24" y="24" width="120" height="40"/>
|
||||
<color key="backgroundColor" red="0.70980392156862748" green="0.054901960784313725" blue="0.054901960784313725" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="og4-sa-zcc">
|
||||
<rect key="frame" x="12" y="5" width="297" height="78"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Gqo-NQ-qFy">
|
||||
<rect key="frame" x="15" y="19" width="120" height="40"/>
|
||||
<color key="backgroundColor" red="0.70980392156862748" green="0.054901960784313725" blue="0.054901960784313725" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="120" id="fbO-WJ-dOx"/>
|
||||
<constraint firstAttribute="height" constant="40" id="j7c-6V-Nkv"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Semibold" family="PingFang SC" pointSize="18"/>
|
||||
<state key="normal" title="更换背景"/>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="scf-Jn-nCG">
|
||||
<rect key="frame" x="163" y="19" width="120" height="40"/>
|
||||
<color key="backgroundColor" red="0.70980392160000005" green="0.054901960780000002" blue="0.054901960780000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="120" id="IbN-g5-5Dk"/>
|
||||
<constraint firstAttribute="height" constant="40" id="YlE-4r-yHL"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Semibold" family="PingFang SC" pointSize="18"/>
|
||||
<state key="normal" title="分享"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="TPM-XU-L0w"/>
|
||||
<constraint firstAttribute="width" constant="120" id="ZPK-wp-9E9"/>
|
||||
<constraint firstAttribute="height" constant="78" id="DO7-hs-rG7"/>
|
||||
<constraint firstAttribute="width" constant="297" id="J73-5q-ui5"/>
|
||||
<constraint firstItem="Gqo-NQ-qFy" firstAttribute="centerY" secondItem="og4-sa-zcc" secondAttribute="centerY" id="KLB-Wx-4AS"/>
|
||||
<constraint firstItem="Gqo-NQ-qFy" firstAttribute="leading" secondItem="og4-sa-zcc" secondAttribute="leading" constant="15" id="QzO-BI-GP4"/>
|
||||
<constraint firstItem="scf-Jn-nCG" firstAttribute="centerY" secondItem="og4-sa-zcc" secondAttribute="centerY" id="cgO-tC-6O7"/>
|
||||
<constraint firstAttribute="trailing" secondItem="scf-Jn-nCG" secondAttribute="trailing" constant="14" id="twO-fW-Eua"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Semibold" family="PingFang SC" pointSize="18"/>
|
||||
<state key="normal" title="更换背景"/>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="scf-Jn-nCG">
|
||||
<rect key="frame" x="176" y="24" width="120" height="40"/>
|
||||
<color key="backgroundColor" red="0.70980392160000005" green="0.054901960780000002" blue="0.054901960780000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="Yva-pt-o9N"/>
|
||||
<constraint firstAttribute="width" constant="120" id="mNM-uk-QUs"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Semibold" family="PingFang SC" pointSize="18"/>
|
||||
<state key="normal" title="分享"/>
|
||||
</button>
|
||||
</view>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="scf-Jn-nCG" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="Gqo-NQ-qFy" secondAttribute="trailing" constant="32" id="MSN-NY-psb"/>
|
||||
<constraint firstItem="scf-Jn-nCG" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="fxv-dG-WQl"/>
|
||||
<constraint firstAttribute="trailing" secondItem="scf-Jn-nCG" secondAttribute="trailing" constant="24" id="iv9-Dq-7bp"/>
|
||||
<constraint firstItem="Gqo-NQ-qFy" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="sta-hl-p4d"/>
|
||||
<constraint firstItem="Gqo-NQ-qFy" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="24" id="y1w-d5-yav"/>
|
||||
<constraint firstItem="og4-sa-zcc" firstAttribute="centerX" secondItem="H2p-sc-9uM" secondAttribute="centerX" id="dvj-W6-RMX"/>
|
||||
<constraint firstItem="og4-sa-zcc" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="kRr-5g-gSI"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
|
||||
|
||||
@@ -13,5 +13,6 @@
|
||||
@property (weak, nonatomic) IBOutlet UILabel *timeLabe;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *percentLabe;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *totalTime;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *useravator;
|
||||
|
||||
@end
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
self.timeholdBack.layer.shadowColor = GIGARGB(233, 226, 226, 1).CGColor;
|
||||
self.timeholdBack.layer.shadowOpacity = 1;
|
||||
//self.timeholdBack.layer.shadowRadius = 6;
|
||||
self.useravator.layer.masksToBounds = YES;
|
||||
self.useravator.layer.cornerRadius = 4;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -105,13 +105,13 @@
|
||||
<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="8Kf-o0-1q0">
|
||||
<rect key="frame" x="171.5" y="139" width="48" height="17"/>
|
||||
<rect key="frame" x="175.5" y="139" width="48" height="17"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="12"/>
|
||||
<color key="textColor" red="0.21568627450980393" green="0.21568627450980393" blue="0.21568627450980393" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="min" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dic-3G-CvO">
|
||||
<rect key="frame" x="307" y="139" width="21" height="17"/>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="张" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dic-3G-CvO">
|
||||
<rect key="frame" x="311" y="139" width="21" height="17"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="17" id="7vV-ZK-S0b"/>
|
||||
<constraint firstAttribute="width" constant="21" id="8AJ-vw-Jnl"/>
|
||||
@@ -137,16 +137,16 @@
|
||||
<constraint firstItem="dic-3G-CvO" firstAttribute="top" secondItem="j6s-4L-8FL" secondAttribute="bottom" constant="33" id="Ht3-2Y-5Mb"/>
|
||||
<constraint firstItem="Tme-2V-NlI" firstAttribute="top" secondItem="R09-WA-3qM" secondAttribute="bottom" constant="26" id="KUx-Nw-4kf"/>
|
||||
<constraint firstItem="R09-WA-3qM" firstAttribute="top" secondItem="tEV-Hx-dgE" secondAttribute="top" constant="61" id="LNc-ql-jSY"/>
|
||||
<constraint firstAttribute="trailing" secondItem="dic-3G-CvO" secondAttribute="trailing" constant="13" id="Lb3-Ut-P6Z"/>
|
||||
<constraint firstAttribute="trailing" secondItem="dic-3G-CvO" secondAttribute="trailing" constant="9" id="Lb3-Ut-P6Z"/>
|
||||
<constraint firstItem="8Kf-o0-1q0" firstAttribute="top" secondItem="Tme-2V-NlI" secondAttribute="bottom" constant="33" id="Lev-qu-Zmr"/>
|
||||
<constraint firstItem="xEv-bM-Qny" firstAttribute="top" secondItem="Tme-2V-NlI" secondAttribute="bottom" constant="4" id="P0c-5d-JJq"/>
|
||||
<constraint firstItem="UA6-7v-cad" firstAttribute="leading" secondItem="tEV-Hx-dgE" secondAttribute="leading" constant="19" id="Tzt-3x-Lfy"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Yg7-YX-5c6" secondAttribute="trailing" constant="14" id="Usm-zC-hhp"/>
|
||||
<constraint firstItem="8Kf-o0-1q0" firstAttribute="leading" secondItem="xEv-bM-Qny" secondAttribute="trailing" constant="-1" id="VD9-bi-F2d"/>
|
||||
<constraint firstItem="8Kf-o0-1q0" firstAttribute="leading" secondItem="xEv-bM-Qny" secondAttribute="trailing" constant="3" id="VD9-bi-F2d"/>
|
||||
<constraint firstItem="Yd8-h2-8ZW" firstAttribute="top" secondItem="j6s-4L-8FL" secondAttribute="bottom" constant="3" id="XWR-b8-Nl1"/>
|
||||
<constraint firstItem="SKr-dU-xbP" firstAttribute="top" secondItem="TkO-iO-bzM" secondAttribute="bottom" constant="4" id="lYD-5E-uY3"/>
|
||||
<constraint firstItem="UA6-7v-cad" firstAttribute="top" secondItem="tEV-Hx-dgE" secondAttribute="top" constant="10" id="mLH-mh-9mJ"/>
|
||||
<constraint firstItem="dic-3G-CvO" firstAttribute="leading" secondItem="Yd8-h2-8ZW" secondAttribute="trailing" constant="-3" id="rVx-wc-qRN"/>
|
||||
<constraint firstItem="dic-3G-CvO" firstAttribute="leading" secondItem="Yd8-h2-8ZW" secondAttribute="trailing" constant="1" id="rVx-wc-qRN"/>
|
||||
<constraint firstItem="5p1-hF-pIU" firstAttribute="leading" secondItem="SKr-dU-xbP" secondAttribute="trailing" constant="8" id="sm5-de-qgC"/>
|
||||
<constraint firstItem="Yg7-YX-5c6" firstAttribute="top" secondItem="tEV-Hx-dgE" secondAttribute="top" constant="20" id="vNY-Db-SYT"/>
|
||||
<constraint firstItem="j6s-4L-8FL" firstAttribute="top" secondItem="R09-WA-3qM" secondAttribute="bottom" constant="26" id="xu2-eN-sWL"/>
|
||||
@@ -166,6 +166,7 @@
|
||||
<outlet property="timeLabe" destination="SKr-dU-xbP" id="LAX-mi-LrF"/>
|
||||
<outlet property="timeholdBack" destination="tEV-Hx-dgE" id="oFa-dy-K2h"/>
|
||||
<outlet property="totalTime" destination="Yd8-h2-8ZW" id="3pB-KH-2ui"/>
|
||||
<outlet property="useravator" destination="UA6-7v-cad" id="Wyb-DM-w0i"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="33.5" y="53.5"/>
|
||||
</tableViewCell>
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// MaskTimeTopAnimationView.h
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/26.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
|
||||
@class MaskTimeTopAnimationView;
|
||||
|
||||
@protocol MaskTimeTextViewDelegate <NSObject>
|
||||
@optional
|
||||
- (void)gyChangeTextView:(MaskTimeTopAnimationView *)textView didTapedAtIndex:(NSInteger)index;
|
||||
|
||||
@end
|
||||
|
||||
@interface MaskTimeTopAnimationView : UIView
|
||||
|
||||
@property (nonatomic, assign) id<MaskTimeTextViewDelegate> delegate;
|
||||
|
||||
- (void)animationWithTexts:(NSArray *)textAry;
|
||||
- (void)stopAnimation;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,131 @@
|
||||
//
|
||||
// MaskTimeTopAnimationView.m
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/26.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MaskTimeTopAnimationView.h"
|
||||
#define DEALY_WHEN_TITLE_IN_MIDDLE 5.0
|
||||
#define DEALY_WHEN_TITLE_IN_BOTTOM 0.0
|
||||
|
||||
typedef NS_ENUM(NSUInteger, GYTitlePosition) {
|
||||
GYTitlePositionTop = 1,
|
||||
GYTitlePositionMiddle = 2,
|
||||
GYTitlePositionBottom = 3
|
||||
};
|
||||
|
||||
@interface MaskTimeTopAnimationView()
|
||||
|
||||
|
||||
@property (nonatomic, strong) UILabel *textLabel;
|
||||
@property (nonatomic, strong) NSArray *contentsAry;
|
||||
@property (nonatomic, assign) CGPoint topPosition;
|
||||
@property (nonatomic, assign) CGPoint middlePosition;
|
||||
@property (nonatomic, assign) CGPoint bottomPosition;
|
||||
/*
|
||||
*1.控制延迟时间,当文字在中间时,延时时间长一些,如5秒,这样可以让用户浏览清楚内容;
|
||||
*2.当文字隐藏在底部的时候,不需要延迟,这样衔接才流畅;
|
||||
*3.通过上面的宏定义去更改需要的值
|
||||
*/
|
||||
@property (nonatomic, assign) CGFloat needDealy;
|
||||
@property (nonatomic, assign) NSInteger currentIndex; /*当前播放到那个标题了*/
|
||||
@property (nonatomic, assign) BOOL shouldStop; /*是否停止*/
|
||||
|
||||
@end
|
||||
|
||||
@implementation MaskTimeTopAnimationView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
//self.backgroundColor = [UIColor whiteColor];
|
||||
self.topPosition = CGPointMake(self.frame.size.width/2 -22, -self.frame.size.height/2);
|
||||
self.middlePosition = CGPointMake(self.frame.size.width/2 - 22, self.frame.size.height/2);
|
||||
self.bottomPosition = CGPointMake(self.frame.size.width/2 -22 , self.frame.size.height/2*3);
|
||||
self.shouldStop = NO;
|
||||
_textLabel = [[UILabel alloc] init];
|
||||
//_textLabel.backgroundColor = [UIColor blackColor];
|
||||
_textLabel.layer.bounds = CGRectMake(0,0, CGRectGetWidth(frame), CGRectGetHeight(frame));
|
||||
|
||||
_textLabel.layer.position = self.middlePosition;
|
||||
_textLabel.textAlignment = NSTextAlignmentCenter;
|
||||
|
||||
_textLabel.textColor = [UIColor whiteColor];
|
||||
_textLabel.font = GIGA_TEXTFONTMEDIUM(13);
|
||||
[self.layer addSublayer:_textLabel.layer];
|
||||
|
||||
self.clipsToBounds = NO; /*保证文字不跑出视图YES*/
|
||||
self.needDealy = DEALY_WHEN_TITLE_IN_MIDDLE; /*控制第一次显示时间*/
|
||||
self.currentIndex = 0;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)animationWithTexts:(NSArray *)textAry {
|
||||
self.contentsAry = textAry;
|
||||
self.textLabel.text = [textAry objectAtIndex:0];
|
||||
//[self.textLabel sizeToFit];
|
||||
[self startAnimation];
|
||||
}
|
||||
|
||||
- (void)startAnimation {
|
||||
__weak typeof(self) weakSelf = self;
|
||||
[UIView animateWithDuration:0.3 delay:self.needDealy options:UIViewAnimationOptionCurveEaseInOut animations:^{
|
||||
if ([weakSelf currentTitlePosition] == GYTitlePositionMiddle) {
|
||||
weakSelf.textLabel.layer.position = weakSelf.topPosition;
|
||||
} else if ([weakSelf currentTitlePosition] == GYTitlePositionBottom) {
|
||||
weakSelf.textLabel.layer.position = weakSelf.middlePosition;
|
||||
}
|
||||
} completion:^(BOOL finished) {
|
||||
if ([weakSelf currentTitlePosition] == GYTitlePositionTop) {
|
||||
weakSelf.textLabel.layer.position = weakSelf.bottomPosition;
|
||||
weakSelf.needDealy = DEALY_WHEN_TITLE_IN_BOTTOM;
|
||||
weakSelf.currentIndex ++;
|
||||
weakSelf.textLabel.text = [weakSelf.contentsAry objectAtIndex:[weakSelf realCurrentIndex]];
|
||||
} else {
|
||||
weakSelf.needDealy = DEALY_WHEN_TITLE_IN_MIDDLE;
|
||||
}
|
||||
if (!weakSelf.shouldStop) {
|
||||
[weakSelf startAnimation];
|
||||
} else { //停止动画后,要设置label位置和label显示内容
|
||||
weakSelf.textLabel.layer.position = weakSelf.middlePosition;
|
||||
weakSelf.textLabel.text = [weakSelf.contentsAry objectAtIndex:[weakSelf realCurrentIndex]];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
- (void)stopAnimation {
|
||||
self.shouldStop = YES;
|
||||
}
|
||||
|
||||
- (NSInteger)realCurrentIndex {
|
||||
return self.currentIndex % [self.contentsAry count];
|
||||
}
|
||||
|
||||
- (GYTitlePosition)currentTitlePosition {
|
||||
if (self.textLabel.layer.position.y == self.topPosition.y) {
|
||||
return GYTitlePositionTop;
|
||||
} else if (self.textLabel.layer.position.y == self.middlePosition.y) {
|
||||
return GYTitlePositionMiddle;
|
||||
}
|
||||
return GYTitlePositionBottom;
|
||||
}
|
||||
|
||||
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
|
||||
if ([self.delegate respondsToSelector:@selector(gyChangeTextView:didTapedAtIndex:)]) {
|
||||
[self.delegate gyChangeTextView:self didTapedAtIndex:[self realCurrentIndex]];
|
||||
}
|
||||
}
|
||||
|
||||
//- (CGSize)intrinsicContentSize
|
||||
//
|
||||
//{
|
||||
//
|
||||
// return UILayoutFittingExpandedSize;
|
||||
//
|
||||
//}
|
||||
|
||||
@end
|
||||
@@ -64,7 +64,7 @@
|
||||
}
|
||||
|
||||
|
||||
if (self.reNewPassFiled.text != self.xinPassFiled.text) {
|
||||
if (![self.reNewPassFiled.text isEqualToString:self.xinPassFiled.text]) {
|
||||
GIGA_ShowToast(@"两次输入密码不一致!");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入旧密码" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="7cM-MG-zEY">
|
||||
<rect key="frame" x="106" y="49" width="245" height="36"/>
|
||||
<rect key="frame" x="106" y="48" width="245" height="37"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="36" id="BPG-0j-gO5"/>
|
||||
<constraint firstAttribute="height" constant="37" id="BPG-0j-gO5"/>
|
||||
</constraints>
|
||||
<color key="textColor" red="0.2156862745" green="0.2156862745" blue="0.2156862745" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="13"/>
|
||||
@@ -49,16 +49,16 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入新密码(6~20位数字、字母、符号)" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="kms-0e-gzX">
|
||||
<rect key="frame" x="106" y="101" width="244" height="31"/>
|
||||
<rect key="frame" x="106" y="104" width="244" height="28"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="31" id="zZ8-hZ-S7v"/>
|
||||
<constraint firstAttribute="height" constant="28" id="zZ8-hZ-S7v"/>
|
||||
</constraints>
|
||||
<color key="textColor" red="0.2156862745" green="0.2156862745" blue="0.2156862745" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="13"/>
|
||||
<textInputTraits key="textInputTraits" keyboardType="namePhonePad" secureTextEntry="YES"/>
|
||||
</textField>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="确认密码" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HhF-Qv-2wC">
|
||||
<rect key="frame" x="29" y="157" width="70" height="20"/>
|
||||
<rect key="frame" x="29" y="156.5" width="70" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="70" id="cjc-Ev-bqF"/>
|
||||
<constraint firstAttribute="height" constant="20" id="qZq-xq-gJb"/>
|
||||
@@ -75,14 +75,14 @@
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="OLf-js-1si">
|
||||
<rect key="frame" x="25" y="142" width="326" height="1"/>
|
||||
<rect key="frame" x="25" y="141.5" width="326" height="1"/>
|
||||
<color key="backgroundColor" red="0.87058823529999996" green="0.87058823529999996" blue="0.87058823529999996" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="cgb-hm-l73"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Jn6-n7-ZUF">
|
||||
<rect key="frame" x="29" y="194" width="322" height="1"/>
|
||||
<rect key="frame" x="29" y="193.5" width="322" height="1"/>
|
||||
<color key="backgroundColor" red="0.87058823529999996" green="0.87058823529999996" blue="0.87058823529999996" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="ifN-m4-Ink"/>
|
||||
@@ -118,7 +118,7 @@
|
||||
<constraint firstItem="HhF-Qv-2wC" firstAttribute="top" secondItem="OLf-js-1si" secondAttribute="bottom" constant="14" id="Ru5-Fq-vEj"/>
|
||||
<constraint firstAttribute="trailing" secondItem="OLf-js-1si" secondAttribute="trailing" constant="24" id="Tnh-gv-meP"/>
|
||||
<constraint firstItem="Q5M-cg-NOt" firstAttribute="trailing" secondItem="ADk-hR-ecA" secondAttribute="trailing" constant="23" id="bMN-9l-hsL"/>
|
||||
<constraint firstItem="kms-0e-gzX" firstAttribute="centerY" secondItem="rCk-5f-1L2" secondAttribute="centerY" constant="-1" id="f3v-vS-DMg"/>
|
||||
<constraint firstItem="kms-0e-gzX" firstAttribute="centerY" secondItem="rCk-5f-1L2" secondAttribute="centerY" constant="1" id="f3v-vS-DMg"/>
|
||||
<constraint firstItem="kms-0e-gzX" firstAttribute="leading" secondItem="rCk-5f-1L2" secondAttribute="trailing" constant="35" id="kNx-dP-EGV"/>
|
||||
<constraint firstItem="rCk-5f-1L2" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" constant="29" id="n8e-7g-uhd"/>
|
||||
<constraint firstItem="Jn6-n7-ZUF" firstAttribute="top" secondItem="ADk-hR-ecA" secondAttribute="bottom" constant="10" id="qez-p1-06i"/>
|
||||
|
||||
@@ -306,7 +306,7 @@
|
||||
self.user.nickName = @"";
|
||||
}
|
||||
|
||||
int leng = [GiGaHelper convertToInt: self.user.nickName];
|
||||
|
||||
if ( self.user.nickName.length >40 ) {
|
||||
GIGA_ShowToast(@"用户名1-40字符长度")
|
||||
return;
|
||||
@@ -498,8 +498,7 @@
|
||||
|
||||
[self.view makeToastActivity:CSToastPositionCenter];
|
||||
NSString *url = [NSString stringWithFormat:@"%@%@",[GiGaServerConfig getMainUrl],kUploadAvator];
|
||||
//NSString *userID = [GiGaUserDefault getCurentUserId];
|
||||
//UIImage *avator =[GIGaFileManager getUserAvatorWith:userID];
|
||||
|
||||
NSData*imageData=UIImageJPEGRepresentation(image,1.0f);
|
||||
|
||||
[GiGaNetManager uploadImage:url imgData:imageData parms:@{@"file":@"file"} responseBlock:^(NSDictionary *responseDict, NSDictionary *responseHeaderFields, NSError *error) {
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
#import "MaskHistryRecord.h"
|
||||
#import <MJRefresh/MJRefresh.h>
|
||||
#import "GiGaWebViewController.h"
|
||||
#import "HistoryNoDataViewCell.h"
|
||||
|
||||
@interface GiMaskTimeHistoryVC ()<UITableViewDelegate,UITableViewDataSource>
|
||||
|
||||
@property(nonatomic,strong) NSMutableArray *dataArr;
|
||||
@@ -23,7 +25,7 @@
|
||||
//@property(nonatomic,strong) MaskHistryRecordlist *record;
|
||||
@property(nonatomic,copy) NSString * guizeUrl;
|
||||
@property(nonatomic) BOOL isFreshing;
|
||||
|
||||
@property(nonatomic,copy) NSString *exquisitePercent;
|
||||
|
||||
@end
|
||||
|
||||
@@ -55,20 +57,39 @@
|
||||
}
|
||||
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
|
||||
|
||||
if (self.dataArr.count == 0) {
|
||||
return 1;
|
||||
}
|
||||
return 2;
|
||||
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
if (self.dataArr.count ==0) {
|
||||
|
||||
HistoryNoDataViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"HistoryNoDataViewCell"];
|
||||
if(!cell){
|
||||
cell = [[[NSBundle mainBundle] loadNibNamed:@"HistoryNoDataViewCell" owner:self options:nil] lastObject];
|
||||
|
||||
}
|
||||
[cell.mianmoBtn addTarget:self action:@selector(mianmoBtnAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
return cell;
|
||||
}
|
||||
|
||||
if(indexPath.section ==0){
|
||||
MasHistoryFirstViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MasHistoryFirstViewCell"];
|
||||
if(!cell){
|
||||
cell = [[[NSBundle mainBundle] loadNibNamed:@"MasHistoryFirstViewCell" owner:self options:nil] lastObject];
|
||||
|
||||
}
|
||||
|
||||
cell.timeLabe.text = [NSString stringWithFormat:@"%ld",(long)self.totalMinute];
|
||||
|
||||
cell.rankLabe.text = [NSString stringWithFormat:@"全国排行榜第%ld名",(long)self.ranking];
|
||||
if (self.exquisitePercent) {
|
||||
cell.rankLabe.text = [NSString stringWithFormat:@"本月超过%@用户",self.exquisitePercent];
|
||||
}
|
||||
|
||||
[cell.guizeBtn addTarget:self action:@selector(guizeShow) forControlEvents:UIControlEventTouchUpInside];
|
||||
return cell;
|
||||
}
|
||||
@@ -127,9 +148,9 @@
|
||||
|
||||
self.ranking = [[reDic valueForKey:@"ranking"] integerValue];
|
||||
self.totalMinute = [[reDic valueForKey:@"totalMinute"] integerValue] ;
|
||||
self.exquisitePercent = [reDic valueForKey:@"exquisitePercent"];
|
||||
self.guizeUrl = [reDic valueForKey:@"ruleUrl"];
|
||||
|
||||
|
||||
NSDictionary *pageDic = reDic[@"page"];
|
||||
|
||||
//self.currentPage = [pageDic valueForKey:@"currPage"];
|
||||
@@ -213,5 +234,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
-(void)mianmoBtnAction{
|
||||
|
||||
[self.navigationController popToRootViewControllerAnimated:YES];
|
||||
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
@property(nonatomic) NSInteger pageSize;
|
||||
@property(nonatomic) NSInteger totalPage;
|
||||
@property(nonatomic) NSInteger currPage;
|
||||
|
||||
@property(nonatomic) NSArray <MaskHistryRecord> *list;
|
||||
@property(nonatomic,copy) NSString *ruleUrl;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<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="GiGAUserInfoCell" id="KGk-i7-Jjw" customClass="GiGAUserInfoCell">
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="GiGAUserInfoCell" id="KGk-i7-Jjw" customClass="GiGAUserInfoCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<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">
|
||||
@@ -39,23 +39,23 @@
|
||||
</constraints>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="l3j-L5-7Uw">
|
||||
<rect key="frame" x="16" y="43" width="328" height="1"/>
|
||||
<rect key="frame" x="16" y="43.5" width="328" height="0.5"/>
|
||||
<color key="backgroundColor" red="0.87058823529411766" green="0.87058823529411766" blue="0.87058823529411766" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="zOJ-Ek-dgz"/>
|
||||
<constraint firstAttribute="height" constant="0.5" id="Chy-NT-dmY"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="beP-cc-pCK" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="0BO-mg-TpM"/>
|
||||
<constraint firstItem="7Df-4e-35M" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" constant="-1.75" id="IOX-Kf-b5p"/>
|
||||
<constraint firstItem="l3j-L5-7Uw" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="16" id="N5r-PD-EsH"/>
|
||||
<constraint firstItem="l3j-L5-7Uw" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="16" id="OJb-DZ-cVh"/>
|
||||
<constraint firstItem="FTl-oI-Mf6" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="16" id="Z3q-9F-Dxi"/>
|
||||
<constraint firstItem="beP-cc-pCK" firstAttribute="leading" secondItem="7Df-4e-35M" secondAttribute="trailing" constant="13" id="gg8-Ms-yU1"/>
|
||||
<constraint firstItem="FTl-oI-Mf6" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="hKa-gq-Jxw"/>
|
||||
<constraint firstAttribute="trailing" secondItem="beP-cc-pCK" secondAttribute="trailing" constant="23.5" id="mZY-Vf-3nT"/>
|
||||
<constraint firstAttribute="bottom" secondItem="l3j-L5-7Uw" secondAttribute="bottom" id="rKH-xt-5nd"/>
|
||||
<constraint firstAttribute="trailing" secondItem="l3j-L5-7Uw" secondAttribute="trailing" constant="31" id="u3G-a1-ogU"/>
|
||||
<constraint firstAttribute="bottom" secondItem="l3j-L5-7Uw" secondAttribute="bottom" constant="-0.5" id="rSW-od-jV4"/>
|
||||
<constraint firstAttribute="trailing" secondItem="l3j-L5-7Uw" secondAttribute="trailing" constant="31" id="t4Z-jU-dSG"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<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="GiGaMineInfoViewCell" id="KGk-i7-Jjw" customClass="GiGaMineInfoViewCell">
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="GiGaMineInfoViewCell" id="KGk-i7-Jjw" customClass="GiGaMineInfoViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="54"/>
|
||||
<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">
|
||||
@@ -36,10 +36,10 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="O4K-t3-KxB">
|
||||
<rect key="frame" x="0.0" y="53" width="409" height="1"/>
|
||||
<rect key="frame" x="16" y="54" width="328" height="1"/>
|
||||
<color key="backgroundColor" red="0.87058823529999996" green="0.87058823529999996" blue="0.87058823529999996" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="lgP-Cy-DDC"/>
|
||||
<constraint firstAttribute="height" constant="0.5" id="IaO-OP-4fG"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="user_indicator_right" translatesAutoresizingMaskIntoConstraints="NO" id="zO5-UY-SQP">
|
||||
@@ -51,13 +51,13 @@
|
||||
</imageView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="O4K-t3-KxB" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="4HX-Qq-cv3"/>
|
||||
<constraint firstAttribute="bottom" secondItem="O4K-t3-KxB" secondAttribute="bottom" constant="-1.5" id="2yu-ep-7jp"/>
|
||||
<constraint firstItem="uc2-z4-fOE" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="5qg-HZ-06o"/>
|
||||
<constraint firstAttribute="trailing" secondItem="O4K-t3-KxB" secondAttribute="trailing" constant="-34" id="Nad-rR-L6i"/>
|
||||
<constraint firstItem="O4K-t3-KxB" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="16" id="Kek-6W-GDM"/>
|
||||
<constraint firstItem="uAa-YI-Wvr" firstAttribute="leading" secondItem="uc2-z4-fOE" secondAttribute="trailing" constant="14.5" id="PO3-lw-pzh"/>
|
||||
<constraint firstItem="zO5-UY-SQP" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" constant="0.25" id="ZCK-2M-1bz"/>
|
||||
<constraint firstAttribute="trailing" secondItem="zO5-UY-SQP" secondAttribute="trailing" constant="23.5" id="b2w-5h-Oei"/>
|
||||
<constraint firstAttribute="bottom" secondItem="O4K-t3-KxB" secondAttribute="bottom" constant="-0.5" id="kHp-np-2YA"/>
|
||||
<constraint firstAttribute="trailing" secondItem="O4K-t3-KxB" secondAttribute="trailing" constant="31" id="dG4-Wi-rgv"/>
|
||||
<constraint firstItem="uAa-YI-Wvr" firstAttribute="centerY" secondItem="uc2-z4-fOE" secondAttribute="centerY" id="sn9-aQ-jMo"/>
|
||||
<constraint firstItem="uc2-z4-fOE" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="16" id="ugC-g4-MrU"/>
|
||||
</constraints>
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// HistoryNoDataViewCell.h
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/26.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface HistoryNoDataViewCell : UITableViewCell
|
||||
@property (weak, nonatomic) IBOutlet UIButton *mianmoBtn;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// HistoryNoDataViewCell.m
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/26.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import "HistoryNoDataViewCell.h"
|
||||
|
||||
@implementation HistoryNoDataViewCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
self.mianmoBtn.layer.masksToBounds = YES;
|
||||
self.mianmoBtn.layer.cornerRadius = self.mianmoBtn.frame.size.height /2 ;
|
||||
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,60 @@
|
||||
<?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="none" indentationWidth="10" reuseIdentifier="HistoryNoDataViewCell" id="KGk-i7-Jjw" customClass="HistoryNoDataViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="255"/>
|
||||
<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="320" height="254.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fUj-va-PAY">
|
||||
<rect key="frame" x="97" y="115" width="126" height="71"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="126" id="Clh-Xb-vyU"/>
|
||||
<constraint firstAttribute="height" constant="71" id="VkN-EF-ik0"/>
|
||||
</constraints>
|
||||
<string key="text">还没有使用记录
|
||||
快开始使用吧</string>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Semibold" family="PingFang SC" pointSize="18"/>
|
||||
<color key="textColor" red="0.41568627450980389" green="0.41568627450980389" blue="0.41568627450980389" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="973-nr-coY">
|
||||
<rect key="frame" x="94" y="204" width="132" height="40"/>
|
||||
<color key="backgroundColor" red="0.70980392156862748" green="0.054901960784313725" blue="0.054901960784313725" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="MuK-2k-ppi"/>
|
||||
<constraint firstAttribute="width" constant="132" id="uir-3s-bpd"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Semibold" family="PingFang SC" pointSize="18"/>
|
||||
<state key="normal" title="去敷面膜"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="973-nr-coY" firstAttribute="centerX" secondItem="H2p-sc-9uM" secondAttribute="centerX" id="1s9-sk-YKf"/>
|
||||
<constraint firstItem="fUj-va-PAY" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="115" id="30t-5z-6YS"/>
|
||||
<constraint firstItem="973-nr-coY" firstAttribute="top" secondItem="fUj-va-PAY" secondAttribute="bottom" constant="18" id="WFD-Uj-xaZ"/>
|
||||
<constraint firstItem="fUj-va-PAY" firstAttribute="centerX" secondItem="H2p-sc-9uM" secondAttribute="centerX" id="iPC-Mm-Shf"/>
|
||||
<constraint firstAttribute="bottom" secondItem="973-nr-coY" secondAttribute="bottom" constant="10.5" id="moi-t3-4FI"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
|
||||
<connections>
|
||||
<outlet property="mianmoBtn" destination="973-nr-coY" id="dEw-vp-HNb"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="34" y="53.5"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
</document>
|
||||
@@ -42,12 +42,6 @@
|
||||
<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="全国总排行第 2 名" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gnX-9k-8vZ">
|
||||
<rect key="frame" x="102" y="139" width="116" height="20"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="14"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="XgR-jp-VUJ">
|
||||
<rect key="frame" x="109" y="11" width="100" height="100"/>
|
||||
<subviews>
|
||||
@@ -82,6 +76,15 @@
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="88" id="zgI-yU-SUl"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="本月超过80%的用户" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gnX-9k-8vZ">
|
||||
<rect key="frame" x="175" y="139" width="129" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="Q4p-6w-N8a"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="14"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="0.70196078431372544" blue="0.70196078431372544" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
@@ -89,12 +92,12 @@
|
||||
<constraint firstItem="XgR-jp-VUJ" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="11" id="F2r-eg-vAz"/>
|
||||
<constraint firstAttribute="trailing" secondItem="XgR-jp-VUJ" secondAttribute="trailing" constant="111" id="UwV-Lm-aak"/>
|
||||
<constraint firstItem="f8a-yz-Ecb" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="16" id="VMM-iR-qKh"/>
|
||||
<constraint firstItem="gnX-9k-8vZ" firstAttribute="top" secondItem="XgR-jp-VUJ" secondAttribute="bottom" constant="28" id="ZbD-KV-Yoz"/>
|
||||
<constraint firstAttribute="trailing" secondItem="gnX-9k-8vZ" secondAttribute="trailing" constant="16" id="aUb-zx-Io4"/>
|
||||
<constraint firstItem="f8a-yz-Ecb" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="3" id="fed-Wy-3U8"/>
|
||||
<constraint firstItem="gnX-9k-8vZ" firstAttribute="top" secondItem="XgR-jp-VUJ" secondAttribute="bottom" constant="28" id="hQc-U7-TzD"/>
|
||||
<constraint firstAttribute="bottom" secondItem="gnX-9k-8vZ" secondAttribute="bottom" constant="10.5" id="heD-OR-neY"/>
|
||||
<constraint firstItem="XgR-jp-VUJ" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="109" id="mKf-YY-Itt"/>
|
||||
<constraint firstItem="kdE-Q9-u1i" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="22" id="ts5-1h-1Td"/>
|
||||
<constraint firstAttribute="bottom" secondItem="gnX-9k-8vZ" secondAttribute="bottom" constant="10.5" id="vj7-z2-psS"/>
|
||||
<constraint firstItem="gnX-9k-8vZ" firstAttribute="centerX" secondItem="H2p-sc-9uM" secondAttribute="centerX" id="yyH-1k-nnl"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
|
||||
|
||||
@@ -19,62 +19,51 @@
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="89.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="第1天敷面膜" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1Mm-qt-QLb">
|
||||
<rect key="frame" x="16" y="10" width="65" height="17"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="17" id="NtX-Gc-7DK"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="12"/>
|
||||
<color key="textColor" red="0.36078431372549019" green="0.36078431372549019" blue="0.36078431372549019" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2018-08-28 13:25:54" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2o1-kY-jHA">
|
||||
<rect key="frame" x="16" y="35" width="111" height="14"/>
|
||||
<rect key="frame" x="16" y="65" width="111" height="14"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="14" id="YEN-Wo-nug"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="10"/>
|
||||
<color key="textColor" red="0.58431372549019611" green="0.58431372549019611" blue="0.58431372549019611" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="TIW-fP-uXf">
|
||||
<rect key="frame" x="16" y="57" width="80" height="22"/>
|
||||
<rect key="frame" x="16" y="22" width="80" height="22"/>
|
||||
<color key="backgroundColor" red="1" green="0.70196078429999997" blue="0.70196078429999997" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="22" id="0YO-kY-Taa"/>
|
||||
<constraint firstAttribute="width" constant="80" id="mIe-rt-3fF"/>
|
||||
<constraint firstAttribute="height" constant="22" id="I6W-0u-oDg"/>
|
||||
<constraint firstAttribute="width" constant="80" id="LZJ-Js-x21"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="10"/>
|
||||
<state key="normal" title="油性皮肤"/>
|
||||
<inset key="imageEdgeInsets" minX="-31" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||
<state key="normal" title="2天" image="user_day"/>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="yqe-qC-fXL">
|
||||
<rect key="frame" x="0.0" y="89" width="320" height="1"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" red="0.92156862745098034" green="0.92156862745098034" blue="0.92156862745098034" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xUV-cj-Gt5">
|
||||
<rect key="frame" x="104" y="57" width="80" height="22"/>
|
||||
<rect key="frame" x="128" y="22" width="80" height="22"/>
|
||||
<color key="backgroundColor" red="0.51372549019607838" green="0.039215686274509803" blue="0.039215686274509803" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="22" id="RmH-dv-yZm"/>
|
||||
<constraint firstAttribute="width" constant="80" id="jvK-Kd-xnz"/>
|
||||
<constraint firstAttribute="width" constant="80" id="kea-4y-siX"/>
|
||||
<constraint firstAttribute="height" constant="22" id="kuK-a3-WKa"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="10"/>
|
||||
<state key="normal" title="倒计时17分钟"/>
|
||||
<inset key="imageEdgeInsets" minX="-16" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||
<state key="normal" title="17分钟" image="user_time"/>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yqe-qC-fXL">
|
||||
<rect key="frame" x="0.0" y="89" width="320" height="1"/>
|
||||
<color key="backgroundColor" red="0.92156862745098034" green="0.92156862745098034" blue="0.92156862745098034" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="mA6-fk-aTf"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="TIW-fP-uXf" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="16" id="6Vu-gO-3O6"/>
|
||||
<constraint firstItem="yqe-qC-fXL" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="HBX-nh-PB3"/>
|
||||
<constraint firstAttribute="bottom" secondItem="yqe-qC-fXL" secondAttribute="bottom" constant="-0.5" id="PGB-TX-GMK"/>
|
||||
<constraint firstItem="xUV-cj-Gt5" firstAttribute="centerY" secondItem="TIW-fP-uXf" secondAttribute="centerY" id="PNM-wS-Fbg"/>
|
||||
<constraint firstItem="2o1-kY-jHA" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="16" id="QHa-BT-Kdi"/>
|
||||
<constraint firstItem="1Mm-qt-QLb" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="16" id="Taa-On-Jut"/>
|
||||
<constraint firstItem="xUV-cj-Gt5" firstAttribute="leading" secondItem="TIW-fP-uXf" secondAttribute="trailing" constant="8" id="gai-Tc-IfZ"/>
|
||||
<constraint firstItem="1Mm-qt-QLb" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="10" id="giX-Bb-4ad"/>
|
||||
<constraint firstAttribute="trailing" secondItem="yqe-qC-fXL" secondAttribute="trailing" id="goy-Cj-fyR"/>
|
||||
<constraint firstItem="yqe-qC-fXL" firstAttribute="top" secondItem="TIW-fP-uXf" secondAttribute="bottom" constant="10" id="kyx-fN-eLe"/>
|
||||
<constraint firstItem="TIW-fP-uXf" firstAttribute="top" secondItem="2o1-kY-jHA" secondAttribute="bottom" constant="8" id="xpc-On-9Xs"/>
|
||||
<constraint firstItem="2o1-kY-jHA" firstAttribute="top" secondItem="1Mm-qt-QLb" secondAttribute="bottom" constant="8" id="yij-7s-itY"/>
|
||||
<constraint firstItem="xUV-cj-Gt5" firstAttribute="leading" secondItem="TIW-fP-uXf" secondAttribute="trailing" constant="32" id="FLX-8w-r6S"/>
|
||||
<constraint firstItem="2o1-kY-jHA" firstAttribute="top" secondItem="TIW-fP-uXf" secondAttribute="bottom" constant="21" id="Lix-N2-E7N"/>
|
||||
<constraint firstItem="TIW-fP-uXf" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="22" id="OK4-lu-IY7"/>
|
||||
<constraint firstItem="xUV-cj-Gt5" firstAttribute="centerY" secondItem="TIW-fP-uXf" secondAttribute="centerY" id="U8G-ca-TRT"/>
|
||||
<constraint firstItem="2o1-kY-jHA" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="16" id="gw8-ZC-PCe"/>
|
||||
<constraint firstAttribute="bottom" secondItem="2o1-kY-jHA" secondAttribute="bottom" constant="10.5" id="rmO-12-pDZ"/>
|
||||
<constraint firstItem="TIW-fP-uXf" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="16" id="ze4-YE-CYw"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
|
||||
@@ -82,9 +71,12 @@
|
||||
<outlet property="skinBtn" destination="TIW-fP-uXf" id="54G-fF-tNQ"/>
|
||||
<outlet property="timeBtn" destination="xUV-cj-Gt5" id="Wt0-LN-jz0"/>
|
||||
<outlet property="timeLabe" destination="2o1-kY-jHA" id="GLQ-Cw-isR"/>
|
||||
<outlet property="timesLabe" destination="1Mm-qt-QLb" id="10I-Ke-pHj"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="-50" y="-57"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="user_day" width="12" height="16"/>
|
||||
<image name="user_time" width="17" height="16"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
@property (nonatomic,assign) int countX;
|
||||
@property (nonatomic,strong) NSArray *titles;
|
||||
@property (nonatomic,copy) NSString *selectjob;
|
||||
@property (nonatomic) CGFloat btnMaXY;
|
||||
@end
|
||||
|
||||
@implementation GiGaUserJobViewCell
|
||||
@@ -29,6 +30,7 @@
|
||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
_countY = 0;
|
||||
_countX = 0;
|
||||
_btnMaXY = 10;
|
||||
[self creatUI];
|
||||
self.titles = [NSArray new];
|
||||
//self.backgroundColor = [UIColor blueColor];
|
||||
@@ -42,14 +44,14 @@
|
||||
|
||||
}
|
||||
-(void)updateActionBtnFrame{
|
||||
_upDownBtn.frame = CGRectMake(KMainW - 22 - 55,self.frame.size.height - 31, 55, 31);
|
||||
_upDownBtn.frame = CGRectMake(KMainW - 22 - 55,_btnMaXY, 55, 31);
|
||||
|
||||
}
|
||||
|
||||
- (UIButton *)upDownBtn{
|
||||
if (!_upDownBtn) {
|
||||
_upDownBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
_upDownBtn.frame = CGRectMake(KMainW - 22 - 55, 10, 55, 31);
|
||||
_upDownBtn.frame = CGRectMake(KMainW - 22 - 55,_btnMaXY, 55, 31);
|
||||
[_upDownBtn addTarget:self action:@selector(upDownBtnAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _upDownBtn;
|
||||
@@ -113,7 +115,6 @@
|
||||
X = X + width + SPACE_X;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -158,7 +159,6 @@
|
||||
X = X + width + SPACE_X;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -192,18 +192,24 @@
|
||||
_countX = 0;
|
||||
|
||||
}
|
||||
|
||||
if (idx == self.titles.count - 1) {
|
||||
_btnMaXY = Y;
|
||||
[self updateActionBtnFrame];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
JobMaskButton *jobBtn = [JobMaskButton buttonWithType:UIButtonTypeCustom];
|
||||
[jobBtn setBackgroundImage:[UIImage imageNamed:@"btn_job"] forState:UIControlStateNormal];
|
||||
//[jobBtn setBackgroundImage:[UIImage imageNamed:@"btn_job"] forState:UIControlStateNormal];
|
||||
jobBtn.layer.masksToBounds =YES;
|
||||
jobBtn.layer.cornerRadius = MARK_H /2;
|
||||
jobBtn.layer.borderWidth = 1;
|
||||
jobBtn.layer.borderColor = GIGARGB(222, 222, 222, 1).CGColor;
|
||||
jobBtn.jobStr = title;
|
||||
NSAttributedString *attri = [GiGaHelper stringWithText:title textColor:GIGARGB(151, 151, 151, 1) textFont:GIGA_TEXTFONTMEDIUM(13) leterSpace:0];
|
||||
[jobBtn setAttributedTitle:attri forState:UIControlStateNormal];
|
||||
jobBtn.frame = CGRectMake(X,Y, width, MARK_H);
|
||||
jobBtn.frame = CGRectMake(X,Y,width, MARK_H);
|
||||
[jobBtn addTarget:self action:@selector(jobClick:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[self addSubview:jobBtn];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user