v0.8.0
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
#import "GiGaBaseAPiRequest.h"
|
||||
#import "GiGaShareModel.h"
|
||||
#import "UIImageView+WebCache.h"
|
||||
#import "UIButton+WebCache.h"
|
||||
|
||||
@interface GIGaMaskShareViewController ()<UIImagePickerControllerDelegate,UINavigationControllerDelegate>
|
||||
@property(nonatomic,strong) GiGaShareModel *model;
|
||||
@end
|
||||
@@ -35,10 +37,41 @@
|
||||
self.tableView.estimatedSectionFooterHeight= 0;
|
||||
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);
|
||||
self.tableView.frame = CGRectMake(0,0,KMainW, self.view.frame.size.height-SAFE_NAV_HEIGHT);
|
||||
|
||||
[self requestshareInfo];
|
||||
[self initUserAvator];
|
||||
}
|
||||
|
||||
-(void)initUserAvator{
|
||||
|
||||
//rightItem
|
||||
UIButton *rightBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
rightBtn.frame = CGRectMake(0, 0, 40, 40);
|
||||
rightBtn.layer.masksToBounds = YES;
|
||||
rightBtn.layer.cornerRadius = 20;
|
||||
[rightBtn setImage:[UIImage imageNamed:@"nav_circle_avatar"] forState:UIControlStateNormal];
|
||||
|
||||
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:rightBtn];
|
||||
|
||||
if ([[[UIDevice currentDevice] systemVersion] doubleValue] >= 11.0) {
|
||||
[rightBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
|
||||
make.size.mas_equalTo(CGSizeMake(40, 40));
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
BOOL isUserLogin = [GiGaUserDefault isUserLogin];
|
||||
if (isUserLogin) {
|
||||
GiGaUser *user = [[GiGaUserManager shareUser] getCurrentUser];
|
||||
if (user) {
|
||||
if (user.headImgUrl && ![user.headImgUrl isKindOfClass:[NSNull class]]) {
|
||||
NSURL *url = [NSURL URLWithString:user.headImgUrl];
|
||||
[rightBtn sd_setImageWithURL:url forState:UIControlStateNormal];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
@@ -64,7 +97,11 @@
|
||||
if (self.model) {
|
||||
cell.minuteLab.text = [NSString stringWithFormat:@"%@min",self.model.minute];
|
||||
cell.timeLable.text = [NSString stringWithFormat:@"这是您敷面膜的第:%@张",self.model.monthMaskNum];
|
||||
if (self.model.productImgUrl && ![self.model.productImgUrl isKindOfClass:[NSNull class]]) {
|
||||
[cell.holdImagView sd_setImageWithURL:[NSURL URLWithString:self.model.productImgUrl]];
|
||||
}
|
||||
}
|
||||
|
||||
return cell;
|
||||
|
||||
}else if (indexPath.section == 1){
|
||||
|
||||
@@ -19,29 +19,86 @@
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
self.view.backgroundColor = [UIColor lightGrayColor];
|
||||
self.view.backgroundColor = [UIColor blueColor];
|
||||
[GiGaUserDefault saveAppGaurdflag:YES];
|
||||
[self creatUI];
|
||||
|
||||
}
|
||||
|
||||
-(void)creatUI{
|
||||
|
||||
|
||||
|
||||
|
||||
UIImageView *backimage = [[UIImageView alloc] init];
|
||||
backimage.image = [UIImage imageNamed:@"appgaurd_bg"];
|
||||
backimage.frame = CGRectMake(0, 0, KMainW, KMainH);
|
||||
//backimage.contentMode = UIViewContentModeScaleToFill;
|
||||
[self.view addSubview:backimage];
|
||||
|
||||
[backimage mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.view.mas_top);
|
||||
make.bottom.mas_equalTo(self.view.mas_bottom);
|
||||
make.left.mas_equalTo(self.view.mas_left);
|
||||
make.right.mas_equalTo(self.view.mas_right);
|
||||
|
||||
}];
|
||||
|
||||
|
||||
|
||||
UIImageView *girlimage = [[UIImageView alloc] init];
|
||||
girlimage.image = [UIImage imageNamed:@"appgaurd_woman"];
|
||||
[self.view addSubview:girlimage];
|
||||
girlimage.contentMode = UIViewContentModeScaleAspectFit;
|
||||
[girlimage mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.view.mas_top).offset(104 + PhoneX_TopMargin);
|
||||
make.centerX.mas_equalTo(self.view.mas_centerX);
|
||||
|
||||
|
||||
}];
|
||||
|
||||
UIImageView *moonimage = [[UIImageView alloc] init];
|
||||
moonimage.image = [UIImage imageNamed:@"appgaurd_moon"];
|
||||
[self.view addSubview:moonimage];
|
||||
|
||||
[moonimage mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.view.mas_top).offset(13 + PhoneX_TopMargin);
|
||||
make.right.mas_equalTo(self.view.mas_right).offset(-5.5);
|
||||
|
||||
}];
|
||||
|
||||
UIButton *dismisBtn= [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[dismisBtn setTitle:@"立即体验" forState:UIControlStateNormal];
|
||||
dismisBtn.backgroundColor = [UIColor greenColor];
|
||||
|
||||
//dismisBtn.backgroundColor = [UIColor greenColor];
|
||||
[dismisBtn addTarget:self action:@selector(dismisBtnAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
[self.view addSubview:dismisBtn];
|
||||
|
||||
[dismisBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(200);
|
||||
make.height.mas_equalTo(30);
|
||||
make.width.mas_equalTo(160);
|
||||
make.height.mas_equalTo(40);
|
||||
make.centerX.mas_equalTo(self.view.mas_centerX);
|
||||
make.top.mas_equalTo(self.view.mas_top).offset(200);
|
||||
make.bottom.mas_equalTo(self.view.mas_bottom).offset(-100);
|
||||
make.top.mas_greaterThanOrEqualTo(girlimage.mas_bottom).offset(20);
|
||||
}];
|
||||
dismisBtn.layer.masksToBounds = YES;
|
||||
dismisBtn.layer.cornerRadius = 15;
|
||||
|
||||
dismisBtn.layer.masksToBounds = YES;
|
||||
dismisBtn.layer.cornerRadius = 20;
|
||||
dismisBtn.layer.borderWidth = 1;
|
||||
dismisBtn.layer.borderColor = [UIColor whiteColor].CGColor;
|
||||
|
||||
|
||||
UIView *botomlineView = [[UIView alloc] init];
|
||||
botomlineView.backgroundColor = [UIColor whiteColor];
|
||||
[self.view addSubview:botomlineView];
|
||||
|
||||
[botomlineView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(self.view.frame.size.width, 1));
|
||||
make.bottom.mas_equalTo(self.view.mas_bottom).offset(-10 - PhoneX_BottomMargin);
|
||||
make.centerX.mas_equalTo(self.view.mas_centerX);
|
||||
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
-(void)dismisBtnAction{
|
||||
@@ -51,6 +108,11 @@
|
||||
}];
|
||||
}
|
||||
|
||||
-(BOOL)prefersStatusBarHidden
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
|
||||
@@ -18,39 +18,57 @@
|
||||
#import "GIGAMBHUDHelper.h"
|
||||
#import "LXCustomSwith.h"
|
||||
#import "GiGaUserDefault.h"
|
||||
#import "GiGaServerConfig.h"
|
||||
|
||||
//弹幕控制器
|
||||
@interface GiGaFlingCommitVC ()
|
||||
@property (nonatomic,strong) GiGaFlyingCommitInputView *commitInputView;
|
||||
@property (nonatomic,strong) SocketIOClient *client;
|
||||
@property (nonatomic,strong) SocketManager *manager;
|
||||
@property (nonatomic,strong) LXCustomSwith *danmuSwitch;
|
||||
|
||||
//@property (nonatomic,strong) LXCustomSwith *danmuSwitch;
|
||||
//开启弹幕按钮
|
||||
@property(nonatomic,strong) UIButton *openDanmuButton;
|
||||
@end
|
||||
|
||||
@implementation GiGaFlingCommitVC
|
||||
|
||||
- (LXCustomSwith *)danmuSwitch{
|
||||
if (!_danmuSwitch) {
|
||||
_danmuSwitch = [[LXCustomSwith alloc] initWithFrame:CGRectMake(KMainW - 50 - 25 , 64 + PhoneX_TopMargin +10, 50, 18)];
|
||||
//- (LXCustomSwith *)danmuSwitch{
|
||||
// if (!_danmuSwitch) {
|
||||
// _danmuSwitch = [[LXCustomSwith alloc] initWithFrame:CGRectMake(KMainW - 50 - 25 , 64 + PhoneX_TopMargin +10, 50, 18)];
|
||||
//
|
||||
// [_danmuSwitch setOffthumTitle:@"弹幕"];
|
||||
// [_danmuSwitch setOnthumTitle:@"弹幕"];
|
||||
// [_danmuSwitch setOnTintColor:GIGARGB(91, 0, 2, 1)];
|
||||
// [_danmuSwitch setTintColor:GIGARGB(91, 0, 2, 1)];
|
||||
// [_danmuSwitch setThumbTintColor:GIGARGB(203, 42, 50, 1)];
|
||||
// _danmuSwitch.on = YES;
|
||||
// _danmuSwitch.thumbLabel.font = GIGA_TEXTFONTMEDIUM(10);
|
||||
// _danmuSwitch.thumbLabel.textColor = [UIColor whiteColor];
|
||||
// [_danmuSwitch addTarget:self action:@selector(mycuntomSwitchAction:) forControlEvents:UIControlEventValueChanged];
|
||||
// }
|
||||
//
|
||||
// return _danmuSwitch;
|
||||
//
|
||||
//}
|
||||
|
||||
- (UIButton *)openDanmuButton{
|
||||
if (!_openDanmuButton) {
|
||||
_openDanmuButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_openDanmuButton addTarget:self action:@selector(openDanmuButtonAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
_openDanmuButton.backgroundColor = GIGARGB(112, 0, 0, 1);
|
||||
_openDanmuButton.frame = CGRectMake(KMainW - 25 -50,SAFE_NAV_HEIGHT + 15, 50, 20);
|
||||
_openDanmuButton.layer.masksToBounds = YES;
|
||||
_openDanmuButton.layer.cornerRadius = 10;
|
||||
NSAttributedString *att = [GiGaHelper stringWithText:@"弹幕" textColor:[UIColor whiteColor] textFont:GIGA_TEXTFONTMEDIUM(10) leterSpace:0];
|
||||
[_openDanmuButton setAttributedTitle:att forState:UIControlStateNormal];
|
||||
[_openDanmuButton setImage:[UIImage imageNamed:@"btn_talk"] forState:UIControlStateNormal];
|
||||
_openDanmuButton.imageEdgeInsets = UIEdgeInsetsMake(0,18, 0, -18);
|
||||
_openDanmuButton.titleEdgeInsets = UIEdgeInsetsMake(0, -4, 0, 4);
|
||||
|
||||
[_danmuSwitch setOffthumTitle:@"弹幕"];
|
||||
[_danmuSwitch setOnthumTitle:@"弹幕"];
|
||||
[_danmuSwitch setOnTintColor:GIGARGB(91, 0, 2, 1)];
|
||||
[_danmuSwitch setTintColor:GIGARGB(91, 0, 2, 1)];
|
||||
[_danmuSwitch setThumbTintColor:GIGARGB(203, 42, 50, 1)];
|
||||
_danmuSwitch.on = YES;
|
||||
_danmuSwitch.thumbLabel.font = GIGA_TEXTFONTMEDIUM(10);
|
||||
_danmuSwitch.thumbLabel.textColor = [UIColor whiteColor];
|
||||
[_danmuSwitch addTarget:self action:@selector(mycuntomSwitchAction:) forControlEvents:UIControlEventValueChanged];
|
||||
}
|
||||
|
||||
return _danmuSwitch;
|
||||
|
||||
return _openDanmuButton;
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (GiGaFlyingCommitInputView *)commitInputView{
|
||||
|
||||
if (!_commitInputView) {
|
||||
@@ -64,8 +82,6 @@
|
||||
|
||||
-(void)mycuntomSwitchAction:(id)sender{
|
||||
|
||||
|
||||
|
||||
LXCustomSwith *nkswitch = (LXCustomSwith *)sender;
|
||||
if (nkswitch.isOn)
|
||||
NSLog(@"switchPressed ON");
|
||||
@@ -77,6 +93,13 @@
|
||||
NSLog(@"switchPressed OFF");
|
||||
}
|
||||
|
||||
-(void)openDanmuButtonAction{
|
||||
[[LXDanMuManager shareInstance] destory];
|
||||
[self destorySocket];
|
||||
NC_POST_NAME_OBJECT(@"UserCloseChatRoomAction", nil);
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
}
|
||||
|
||||
-(void)viewWillAppear:(BOOL)animated{
|
||||
[super viewWillAppear:animated];
|
||||
NC_ADD_TARGET_NAME_OBJECT(self, @selector(maskTimeEnd), kUserNoti_MASKEND, nil);
|
||||
@@ -98,8 +121,9 @@
|
||||
|
||||
// Do any additional setup after loading the view.
|
||||
[self.view addSubview: self.commitInputView];
|
||||
[self.view addSubview:self.danmuSwitch];
|
||||
[self.view bringSubviewToFront:self.danmuSwitch];
|
||||
// [self.view addSubview:self.danmuSwitch];
|
||||
// [self.view bringSubviewToFront:self.danmuSwitch];
|
||||
[self.view addSubview:self.openDanmuButton];
|
||||
|
||||
weakify(self);
|
||||
|
||||
@@ -114,7 +138,7 @@
|
||||
};
|
||||
|
||||
//开启弹幕
|
||||
[[LXDanMuManager shareInstance] createDanmuWithTrackSpeedArray:@[@1.00,@1.00,@3.00,@4.00] centerY:KMainH / 4 trackWidth:KMainW showInView:self.view];
|
||||
[[LXDanMuManager shareInstance] createDanmuWithTrackSpeedArray:@[@1.00,@1.00,@3.00,@3.00] centerY:KMainH / 4 trackWidth:KMainW showInView:self.view];
|
||||
[[LXDanMuManager shareInstance] start];
|
||||
//socket
|
||||
[self connetction];
|
||||
@@ -133,9 +157,9 @@
|
||||
//@"connectParams":@{@"token":@""}
|
||||
NSString *token = [GiGaUserDefault getCurentToken];
|
||||
if (!token) {
|
||||
token = @"";
|
||||
token = @"1";
|
||||
}
|
||||
NSString *urlstr = [NSString stringWithFormat:@"http://wsyts.s1.natapp.cc"];
|
||||
NSString *urlstr = [GiGaServerConfig getsocketUrl];
|
||||
NSURL* url = [[NSURL alloc] initWithString:urlstr];
|
||||
SocketManager *manager = [[SocketManager alloc] initWithSocketURL:url config:@{@"log": @NO, @"forcePolling": @YES,@"extraHeaders":@{@"device":@"ios"},@"connectParams":@{@"token":token}}];
|
||||
|
||||
@@ -147,14 +171,32 @@
|
||||
[self.client on:@"connect" callback:^(NSArray* data, SocketAckEmitter* ack) {
|
||||
//GIGA_WIndowTost(@"客户端上线");
|
||||
NSLog(@"*************\n\niOS客户端上线\n\n*************");
|
||||
|
||||
NSArray *arr = @[@{
|
||||
@"token":token,
|
||||
}];
|
||||
[weakSelf.client emit:@"login" with:arr];
|
||||
|
||||
|
||||
}];
|
||||
|
||||
[self.client on:@"connectedSocket" callback:^(NSArray * _Nonnull event, SocketAckEmitter * _Nonnull ack) {
|
||||
|
||||
[self.client on:@"onLogin" callback:^(NSArray * _Nonnull event, SocketAckEmitter * _Nonnull ack) {
|
||||
//
|
||||
[GIGAMBHUDHelper messageAddto:self.view title:@"弹幕链接成功"];
|
||||
NSLog(@"connectedSocket:%@",event);
|
||||
NSLog(@"login 监听:%@",event);
|
||||
|
||||
}];
|
||||
|
||||
[self.client on:@"connectedSocket" callback:^(NSArray * _Nonnull event, SocketAckEmitter * _Nonnull ack) {
|
||||
// [GIGAMBHUDHelper messageAddto:self.view title:@"弹幕链接成功"];
|
||||
NSLog(@"connectedSocket:%@",event);
|
||||
|
||||
|
||||
}];
|
||||
|
||||
|
||||
|
||||
[self.client on:@"onTalk" callback:^(NSArray * _Nonnull data, SocketAckEmitter * _Nonnull ack) {
|
||||
|
||||
//NSString *json =data[0];
|
||||
@@ -175,7 +217,7 @@
|
||||
|
||||
[self.client on:@"disconnect" callback:^(NSArray * _Nonnull event, SocketAckEmitter * _Nonnull ack) {
|
||||
|
||||
GIGA_WIndowTost(@"客户端下线");
|
||||
GIGA_WIndowTost(@"弹幕已断开");
|
||||
NSLog(@"*************\n\niOS客户端下线\n\n*************%@",event?event[0]:@"");
|
||||
}];
|
||||
|
||||
@@ -221,4 +263,5 @@
|
||||
self.manager = nil;
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
[_openDanmuButton setImage:[UIImage imageNamed:@"btn_talk"] forState:UIControlStateNormal];
|
||||
//_openDanmuButton.imageEdgeInsets = UIEdgeInsetsMake(0, 0, 0, 0);
|
||||
_openDanmuButton.titleEdgeInsets = UIEdgeInsetsMake(0, -25, 0, 25);
|
||||
|
||||
_openDanmuButton.hidden = YES;
|
||||
}
|
||||
return _openDanmuButton;
|
||||
}
|
||||
@@ -143,6 +143,8 @@
|
||||
_cicleProgressView = [[MaskTimeCircularProgressView alloc] initWithFrame:CGRectMake(100, 251 + PhoneX_TopMargin, 125, 125) backColor:GIGARGB(88, 0, 2, 1) progressColor:[UIColor blueColor] lineWidth:10 timeinterval:10];
|
||||
_cicleProgressView.delegate = self;
|
||||
_cicleProgressView.hidden = YES;
|
||||
UITapGestureRecognizer *cicleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(maskTimeCycleTapAction)];
|
||||
[_cicleProgressView addGestureRecognizer:cicleTap];
|
||||
|
||||
}
|
||||
return _cicleProgressView;
|
||||
@@ -194,7 +196,7 @@
|
||||
|
||||
#pragma mark 弹幕
|
||||
-(void)createInputView{
|
||||
self.openDanmuButton.hidden = YES;
|
||||
|
||||
GiGaFlingCommitVC* GiGaFlingVC = [[GiGaFlingCommitVC alloc] init];
|
||||
if (ISIOS8) {
|
||||
GiGaFlingVC.modalPresentationStyle = UIModalPresentationOverCurrentContext;
|
||||
@@ -211,7 +213,7 @@
|
||||
[super viewWillAppear:animated];
|
||||
//取消导航对内容下移影响
|
||||
[self.navigationController.navigationBar setTranslucent:YES];
|
||||
self.openDanmuButton.hidden = NO;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -221,18 +223,14 @@
|
||||
self.navigationController.interactivePopGestureRecognizer.enabled = NO;
|
||||
}
|
||||
|
||||
// 暂不用 app引导页
|
||||
|
||||
// BOOL showAppGaurd = [GiGaUserDefault isShowedAppGaurd];
|
||||
// if (showAppGaurd == NO) {
|
||||
// [self showAPPappGaurdView];
|
||||
// }
|
||||
//新手蒙版
|
||||
BOOL isshowGaurd = [GiGaUserDefault isShowedGaurd];
|
||||
if (isshowGaurd == NO) {
|
||||
NSLog(@"%d",(int)isshowGaurd );
|
||||
[self showUserGaurdView];
|
||||
// app引导页
|
||||
|
||||
BOOL showAppGaurd = [GiGaUserDefault isShowedAppGaurd];
|
||||
if (showAppGaurd == NO) {
|
||||
[self showAPPappGaurdView];
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -268,6 +266,23 @@
|
||||
[self animaMask];
|
||||
}
|
||||
|
||||
#pragma mark 圆环点击 结束倒计时
|
||||
-(void)maskTimeCycleTapAction{
|
||||
[self jxt_showAlertWithTitle:@"提示" message:@"确定结束面膜时间?" appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
|
||||
alertMaker.addActionCancelTitle(@"取消");
|
||||
alertMaker.addActionDefaultTitle(@"结束");
|
||||
|
||||
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
|
||||
if (buttonIndex == 1) {
|
||||
[self.cicleProgressView stop];
|
||||
[self maskTimeEnd];
|
||||
}
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#pragma mark - 开始面膜时间动画 合并
|
||||
-(void)animaMask{
|
||||
|
||||
@@ -294,11 +309,10 @@
|
||||
|
||||
[self.view layoutIfNeeded];
|
||||
} completion:^(BOOL finished) {
|
||||
// self.cicleProgressView.hidden = NO;
|
||||
// self.maskImageView.userInteractionEnabled = NO;
|
||||
//开始面膜时间
|
||||
//[self startMaskTime];
|
||||
|
||||
|
||||
[self updateMaskingView];
|
||||
|
||||
}];
|
||||
}
|
||||
#pragma mark 面膜中头像位置
|
||||
@@ -425,7 +439,7 @@
|
||||
|
||||
//startTest
|
||||
[self.startTestButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.view.mas_top).offset(486 + PhoneX_TopMargin);
|
||||
make.top.mas_equalTo(self.view.mas_top).offset(476 + PhoneX_TopMargin);
|
||||
make.size.mas_equalTo(CGSizeMake(132, 41));
|
||||
make.centerX.mas_equalTo(self.view.mas_centerX);
|
||||
}];
|
||||
@@ -459,6 +473,7 @@
|
||||
|
||||
#pragma mark 开始面膜时间
|
||||
-(void)startMaskTime{
|
||||
self.openDanmuButton.hidden = YES;
|
||||
//记录
|
||||
[self sendBengainMaskTime];
|
||||
[self createInputView]; //出现弹幕
|
||||
@@ -468,13 +483,12 @@
|
||||
}
|
||||
delegate.isMasking = YES;
|
||||
[_musicPalyer play];
|
||||
//[self setBackGroundPlayingInfo];//锁屏音频信息
|
||||
[self setBackGroundPlayingInfo];//锁屏音频信息
|
||||
|
||||
//总时间隔 s
|
||||
//NSTimeInterval timeInterVal = [GiGaUserDefault getUserMaskeTime];
|
||||
NSTimeInterval timeInterVal = 6;
|
||||
[self.cicleProgressView startWith:timeInterVal];
|
||||
NSTimeInterval timeInterVal = [GiGaUserDefault getUserMaskeTime];
|
||||
|
||||
[self.cicleProgressView startWith:timeInterVal];
|
||||
//底部弹窗
|
||||
[self showWaringView];
|
||||
|
||||
@@ -524,7 +538,7 @@
|
||||
|
||||
#pragma mark 面膜时间结束
|
||||
-(void)maskTimeEnd{
|
||||
|
||||
self.openDanmuButton.hidden = YES;
|
||||
[self sendEndMaskTime];
|
||||
NC_POST_NAME_OBJECT(kUserNoti_MASKEND, nil);
|
||||
//面膜时间结束时设置 全局变量 不再发送本地通知 提醒
|
||||
@@ -617,7 +631,7 @@
|
||||
}else{
|
||||
userGuardVC.modalPresentationStyle = UIModalPresentationCurrentContext;
|
||||
}
|
||||
userGuardVC.view.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.3];
|
||||
userGuardVC.view.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.4];
|
||||
[self presentViewController:userGuardVC animated:NO completion:nil];
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
@property(nonatomic,strong) UITableView *tab;
|
||||
@property(nonatomic,strong) UIImageView *backimageview ;
|
||||
@property(nonatomic) int curentImageIndex ;
|
||||
|
||||
@property(nonatomic,strong) NSArray *descArr;
|
||||
|
||||
@end
|
||||
|
||||
@@ -34,9 +34,9 @@
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
_curentImageIndex = 0;
|
||||
_curentImageIndex = 5;
|
||||
[self creatTabUI];
|
||||
|
||||
self.descArr = @[@"生活不易,必须美丽",@"长夜漫漫,不如面膜时间",@"敷片面膜,人间值得",@"打开面膜时间,撰写你与美丽的故事",@"人越美丽,责任越大",@"吃得苦中苦,方为人上人",@"该放弃的决不挽留,该留住的决不放手"];
|
||||
|
||||
UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
backBtn.frame = CGRectMake(20,20 +PhoneX_TopMargin, 40, 40);
|
||||
@@ -70,8 +70,7 @@
|
||||
backimageview.frame = CGRectMake(0,0,self.view.frame.size.width, self.view.frame.size.height);
|
||||
backimageview.userInteractionEnabled = YES;
|
||||
backimageview.image = [GIGaUserFileHelper getUserShareImage:kUSERSHAREA_IMAGENAME];
|
||||
|
||||
// self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"sharebg_1"]];
|
||||
|
||||
self.backimageview = backimageview;
|
||||
|
||||
self.tab.backgroundView = backimageview;
|
||||
@@ -92,8 +91,10 @@
|
||||
cell = [[[NSBundle mainBundle] loadNibNamed:@"MaskTimeShareViewCell" owner:self options:nil] lastObject];
|
||||
|
||||
}
|
||||
|
||||
//默认
|
||||
cell.descLabe.text = self.descArr[self.curentImageIndex];
|
||||
return cell;
|
||||
|
||||
}else if (indexPath.row == 1){
|
||||
MaskShareTimeMidViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MaskShareTimeMidViewCell"];
|
||||
if (!cell) {
|
||||
@@ -192,26 +193,31 @@
|
||||
case 1:
|
||||
{
|
||||
//系统
|
||||
self->_curentImageIndex ++;
|
||||
if (self->_curentImageIndex == 4) {
|
||||
self->_curentImageIndex = 0;
|
||||
self.curentImageIndex ++;
|
||||
|
||||
if (self.curentImageIndex > 6) {
|
||||
|
||||
self.curentImageIndex = 0;
|
||||
}
|
||||
NSArray *images = @[@"sharebg_1",@"sharebg_2",@"sharebg_3",@"sharebg_4",@"sharebg_5"];
|
||||
|
||||
NSArray *images = @[@"sharebg_1",@"sharebg_2",@"sharebg_3",@"sharebg_4",@"sharebg_5",@"sharebg_6",@"sharebg_7"];
|
||||
|
||||
[self.backimageview setImage:[UIImage imageNamed: images[self->_curentImageIndex]]];
|
||||
|
||||
MaskTimeShareViewCell *cell = [self.tab cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]];
|
||||
|
||||
if (self.curentImageIndex==0) {
|
||||
cell.shareLabe.image = [UIImage imageNamed:@"share_oneblack"];
|
||||
cell.doinglabel.textColor = [UIColor blackColor];
|
||||
}
|
||||
NSArray *shareimages = @[@"share_oneblack",@"share_one",@"share_one",@"share_one",@"share_one",@"share_one",@"share_one"];
|
||||
|
||||
NSArray*doingcolorS = @[[UIColor blackColor],GIGARGB(170, 170, 170, 1),[UIColor blackColor],[UIColor blackColor],[UIColor blackColor],[UIColor blackColor],[UIColor blackColor]];
|
||||
|
||||
cell.shareLabe.image = [UIImage imageNamed:shareimages[self.curentImageIndex]];
|
||||
cell.doinglabel.textColor = doingcolorS[self.curentImageIndex];
|
||||
|
||||
NSArray *descArr = @[@"生活不易,必须美丽",@"长夜漫漫,不如面膜时间",@"敷片面膜,人间值得",@"打开面膜时间,撰写你与美丽的故事",@"人越美丽,责任越大",@"吃得苦中苦,方为人上人",@"该放弃的决不挽留,该留住的决不放手"];
|
||||
NSArray *desColor = @[[UIColor whiteColor],[UIColor whiteColor],[UIColor blackColor],[UIColor whiteColor],[UIColor whiteColor],[UIColor whiteColor],[UIColor blackColor]];
|
||||
cell.descLabe.text = descArr[self.curentImageIndex];
|
||||
cell.descLabe.textColor = desColor[self.curentImageIndex];
|
||||
|
||||
if (self.curentImageIndex == 1) {
|
||||
cell.shareLabe.image = [UIImage imageNamed:@"share_one"];
|
||||
cell.doinglabel.textColor = GIGARGB(170, 170, 170, 1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -324,9 +330,9 @@
|
||||
}
|
||||
|
||||
UIImage *image = [UIImage saveLongImage:self.tab];
|
||||
[self jxt_showActionSheetWithTitle:@"分享微信" message:@"" appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
|
||||
[self jxt_showActionSheetWithTitle:@"分享到微信" message:@"" appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
|
||||
|
||||
alertMaker.addActionDefaultTitle(@"朋友");
|
||||
alertMaker.addActionDefaultTitle(@"微信好友");
|
||||
alertMaker.addActionDefaultTitle(@"朋友圈");
|
||||
alertMaker.addActionCancelTitle(@"取消");
|
||||
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
|
||||
@@ -366,6 +372,8 @@
|
||||
//分享成功
|
||||
-(void)usershareSuccessNoti{
|
||||
|
||||
GIGA_ShowToast(@"分享成功");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// ShareViewSystemImageHelper.h
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/29.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface ShareViewSystemImageHelper : NSObject
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// ShareViewSystemImageHelper.m
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/29.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import "ShareViewSystemImageHelper.h"
|
||||
|
||||
@implementation ShareViewSystemImageHelper
|
||||
|
||||
@end
|
||||
@@ -87,9 +87,11 @@
|
||||
titleLabel.font = [UIFont fontWithName:GIGA_FONTBOLD size:16];
|
||||
titleLabel.textColor = GIGARGB(63, 63, 63, 1);
|
||||
titleLabel.numberOfLines = 2;
|
||||
//titleLabel.backgroundColor = [UIColor redColor];
|
||||
self.questionlabel = titleLabel;
|
||||
[titleLabel sizeToFit];
|
||||
//[titleLabel sizeToFit];
|
||||
[self.view addSubview:titleLabel];
|
||||
|
||||
|
||||
UILabel *descLabel = [[UILabel alloc] init];
|
||||
descLabel.text = @"精准的选择,让小优更好的为您挑选最符合您的肤质的面膜";
|
||||
@@ -113,7 +115,8 @@
|
||||
|
||||
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(-20);
|
||||
make.height.mas_equalTo(40);
|
||||
|
||||
}];
|
||||
|
||||
@@ -139,9 +142,13 @@
|
||||
[self.view addSubview:nextBtn];
|
||||
|
||||
[nextBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.view.mas_top).offset(529 -navH);
|
||||
if (self.view.frame.size.height <=504) {
|
||||
make.top.mas_equalTo(self.view.mas_top).offset(504 - navH);
|
||||
}else{
|
||||
make.top.mas_equalTo(self.view.mas_top).offset(529 - navH);
|
||||
}
|
||||
make.size.mas_equalTo(CGSizeMake(126, 40));
|
||||
make.left.mas_equalTo(self.view.mas_left).offset(self.view.frame.size.width /2 - 126 /2);
|
||||
make.left.mas_equalTo(self.view.mas_centerX).offset(- 126 /2);
|
||||
}];
|
||||
|
||||
|
||||
@@ -159,15 +166,23 @@
|
||||
[self.view addSubview:self.preBtn];
|
||||
|
||||
[self.preBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.view.mas_left).offset(69);
|
||||
make.top.mas_equalTo(self.view.mas_top).offset(529 - navH);
|
||||
make.size.mas_equalTo(CGSizeMake(97, 40));
|
||||
|
||||
if (self.view.frame.size.height <=504) {
|
||||
make.top.mas_equalTo(self.view.mas_top).offset(504 - navH);
|
||||
}else{
|
||||
make.top.mas_equalTo(self.view.mas_top).offset(529 - navH);
|
||||
}
|
||||
|
||||
make.size.mas_equalTo(CGSizeMake(97, 40));
|
||||
make.left.mas_equalTo(self.view.mas_centerX).offset(-10-97);
|
||||
}];
|
||||
|
||||
if (_page == 1) {
|
||||
self.preBtn.hidden = YES;
|
||||
}
|
||||
|
||||
[self reloadViews];
|
||||
|
||||
}
|
||||
|
||||
-(void)creatQustionView{
|
||||
@@ -247,8 +262,8 @@
|
||||
}else{
|
||||
model.defaultFlag = 0;
|
||||
}
|
||||
|
||||
}];
|
||||
|
||||
}
|
||||
-(void)loadRequestQuestions{
|
||||
|
||||
@@ -262,6 +277,10 @@
|
||||
|
||||
NSLog(@"result:%@",result.dic);
|
||||
NSArray *list = result.dic[@"list"];
|
||||
if (list.count==0 || [list isKindOfClass: [NSNull class]]) {
|
||||
GIGA_ShowToast(@"空");
|
||||
return ;
|
||||
}
|
||||
for (NSDictionary *answerDic in list) {
|
||||
ExercisesModel *model = [[ExercisesModel alloc] initWithDictionary:answerDic error:nil];
|
||||
model.slidervalue = 0;
|
||||
@@ -290,8 +309,8 @@
|
||||
[self.questonArray addObject:model];
|
||||
|
||||
}
|
||||
self.currentModel = self.questonArray[0];
|
||||
|
||||
self.currentModel = self.questonArray[0];
|
||||
[self initUI];
|
||||
}
|
||||
}];
|
||||
@@ -303,6 +322,7 @@
|
||||
|
||||
_currentModel = _questonArray[_page - 1];
|
||||
[self reloadViews];
|
||||
|
||||
}
|
||||
|
||||
#pragma mark 刷新题目
|
||||
@@ -310,11 +330,20 @@
|
||||
-(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];
|
||||
|
||||
|
||||
if (_page == self.questonArray.count) {
|
||||
|
||||
NSAttributedString *nextTitle = [[NSAttributedString alloc] initWithString:@"完成" attributes:@{NSFontAttributeName:[UIFont fontWithName:GIGA_FONTBOLD size:18],NSForegroundColorAttributeName:[UIColor whiteColor]}];
|
||||
[_nextBtn setAttributedTitle:nextTitle forState:UIControlStateNormal];
|
||||
|
||||
}else{
|
||||
NSAttributedString *nextTitle = [[NSAttributedString alloc] initWithString:@"下一题" attributes:@{NSFontAttributeName:[UIFont fontWithName:GIGA_FONTBOLD size:18],NSForegroundColorAttributeName:[UIColor whiteColor]}];
|
||||
[_nextBtn setAttributedTitle:nextTitle forState:UIControlStateNormal];
|
||||
}
|
||||
|
||||
self.questionlabel.text = [NSString stringWithFormat:@"%@",_currentModel.question];
|
||||
|
||||
self.descLabel.text = _currentModel.remark;
|
||||
|
||||
//
|
||||
@@ -325,19 +354,35 @@
|
||||
|
||||
if (_page > 1) {
|
||||
self.preBtn.hidden = NO;
|
||||
[self.nextBtn mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.view.mas_top).offset(529 -SAFE_NAV_HEIGHT);
|
||||
make.size.mas_equalTo(CGSizeMake(126, 40));
|
||||
make.left.mas_equalTo(self.view.mas_left).offset(self.view.frame.size.width /2 + 10);
|
||||
if (self.view.frame.size.height <= 504) {
|
||||
[self.nextBtn mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.view.mas_top).offset(504 -SAFE_NAV_HEIGHT);
|
||||
make.size.mas_equalTo(CGSizeMake(126, 40));
|
||||
make.left.mas_equalTo(self.view.mas_centerX).offset(10);
|
||||
|
||||
}];
|
||||
|
||||
}];
|
||||
}else{
|
||||
[self.nextBtn mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.view.mas_top).offset(529 -SAFE_NAV_HEIGHT);
|
||||
make.size.mas_equalTo(CGSizeMake(126, 40));
|
||||
make.left.mas_equalTo(self.view.mas_centerX).offset(10);
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
}else{
|
||||
|
||||
[self.nextBtn mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.view.mas_top).offset(529 -SAFE_NAV_HEIGHT);
|
||||
if (self.view.frame.size.height <= 504) {
|
||||
make.top.mas_equalTo(self.view.mas_top).offset(504 -SAFE_NAV_HEIGHT);
|
||||
}else{
|
||||
make.top.mas_equalTo(self.view.mas_top).offset(529 -SAFE_NAV_HEIGHT);
|
||||
}
|
||||
|
||||
make.size.mas_equalTo(CGSizeMake(126, 40));
|
||||
make.left.mas_equalTo(self.view.mas_left).offset(self.view.frame.size.width /2 - 126 /2);
|
||||
make.left.mas_equalTo(self.view.mas_centerX).offset(-63);
|
||||
}];
|
||||
self.preBtn.hidden = YES;
|
||||
}
|
||||
@@ -349,6 +394,7 @@
|
||||
[self saveProgress];
|
||||
if (_page == self.questonArray.count ) {
|
||||
//GIGA_ShowToast(@"没有了");
|
||||
|
||||
[self submitAnswer];
|
||||
return;
|
||||
}
|
||||
@@ -363,7 +409,7 @@
|
||||
|
||||
|
||||
-(void)submitAnswer{
|
||||
|
||||
|
||||
[self userTestEnd];
|
||||
}
|
||||
|
||||
@@ -397,10 +443,12 @@
|
||||
//获取结果
|
||||
-(void)getTestResult{
|
||||
|
||||
self.nextBtn.userInteractionEnabled = NO;
|
||||
NSDictionary *params = @{@"singleChoiceList":self.answerArray};
|
||||
[self.view makeToastActivity:CSToastPositionCenter];
|
||||
NSString *url = [NSString stringWithFormat:@"%@%@",[GiGaServerConfig getMainUrl],kAiSkinTestResult];
|
||||
[GiGaNetManager userbodyRequest:url params:params completionHandler:^(NSURLResponse *response, NSDictionary *resDic, NSError * _Nullable error) {
|
||||
self.nextBtn.userInteractionEnabled = YES;
|
||||
[self.view hideToastActivity];
|
||||
GiGaAPIResult *result = [[GiGaAPIResult alloc] initWithDictionary:resDic];
|
||||
if (result.success) {
|
||||
@@ -423,6 +471,7 @@
|
||||
// MaskTestResult *model =[[MaskTestResult alloc] initWithDictionary:dic error:nil];
|
||||
MaskTestResultVC *resultVC = [[MaskTestResultVC alloc] init];
|
||||
resultVC.model = mode;
|
||||
resultVC.isfromshouYE = YES;
|
||||
[self.navigationController pushViewController:resultVC animated:YES];
|
||||
|
||||
}else{
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
@interface MaskTestResultVC : GiGaBaseViewController
|
||||
@property (nonatomic,strong) MaskTestResult *model;
|
||||
@property (nonatomic) BOOL isfromshouYE;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@@ -17,17 +17,22 @@
|
||||
#import <WXApi.h>
|
||||
#import "MaskTestResult.h"
|
||||
#import "MaskTestNODataViewCell.h"
|
||||
|
||||
#import "UIButton+WebCache.h"
|
||||
#import "UIImageView+WebCache.h"
|
||||
@interface MaskTestResultVC ()
|
||||
|
||||
@property (nonatomic,strong) UIView *tabheader;
|
||||
//@property (nonatomic,strong) UIImageView *qrimageView;
|
||||
|
||||
@end
|
||||
|
||||
@implementation MaskTestResultVC
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
[self addNavTitile:@"测试结果"];
|
||||
[super viewDidLoad];
|
||||
|
||||
|
||||
// Do any additional setup after loading the view.
|
||||
[self.view addSubview:self.tableView];
|
||||
self.tableView.delegate = self;
|
||||
@@ -37,26 +42,160 @@
|
||||
self.tableView.sectionFooterHeight = 0;
|
||||
self.tableView.estimatedSectionFooterHeight= 0;
|
||||
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);
|
||||
|
||||
//分享用默认隐藏
|
||||
UIView *holdView = [[UIView alloc] initWithFrame:CGRectMake(0, 0,self.view.frame.size.width, SAFE_NAV_HEIGHT)];
|
||||
holdView.backgroundColor = [UIColor whiteColor];
|
||||
|
||||
UIView *tabheader = [[UIView alloc] initWithFrame:holdView.bounds];
|
||||
tabheader.backgroundColor = GIGA_MAIN_BGCOLOR;
|
||||
|
||||
[holdView addSubview:tabheader];
|
||||
|
||||
|
||||
UILabel *reslabel = [[UILabel alloc] init];
|
||||
reslabel.text = @"我的皮肤测试结果:";
|
||||
reslabel.textColor = [UIColor whiteColor];
|
||||
reslabel.font = GIGA_TEXTFONTBOLD(20);
|
||||
[tabheader addSubview:reslabel];
|
||||
[reslabel sizeToFit];
|
||||
[reslabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(tabheader.mas_left).offset(18);
|
||||
make.centerY.mas_equalTo(tabheader.mas_centerY);
|
||||
|
||||
}];
|
||||
|
||||
UIImageView *shareUserImageView = [[UIImageView alloc] init];
|
||||
BOOL isUserLogin = [GiGaUserDefault isUserLogin];
|
||||
if (isUserLogin) {
|
||||
GiGaUser *user = [[GiGaUserManager shareUser] getCurrentUser];
|
||||
if (user) {
|
||||
if (user.headImgUrl && ![user.headImgUrl isKindOfClass:[NSNull class]]) {
|
||||
NSURL *url = [NSURL URLWithString:user.headImgUrl];
|
||||
[shareUserImageView sd_setImageWithURL:url placeholderImage:[UIImage imageNamed:@"nav_circle_avatar"]];
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[tabheader addSubview:shareUserImageView];
|
||||
[shareUserImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(tabheader.mas_right).offset(-18);
|
||||
make.size.mas_equalTo(CGSizeMake(34, 34));
|
||||
make.centerY.mas_equalTo(tabheader.mas_centerY);
|
||||
|
||||
}];
|
||||
shareUserImageView.layer.masksToBounds = YES;
|
||||
shareUserImageView.layer.cornerRadius = 17;
|
||||
tabheader.hidden = YES;
|
||||
self.tabheader = tabheader;
|
||||
self.tableView.tableHeaderView = holdView;
|
||||
|
||||
|
||||
self.tableView.frame = CGRectMake(0,-SAFE_NAV_HEIGHT,KMainW,KMainH);
|
||||
[self.tableView registerClass:[MaskResultPercentCell class] forCellReuseIdentifier:@"MaskResultPercentCell"];
|
||||
[self.tableView registerClass:[MaskResultMinViewCell class] forCellReuseIdentifier:@"MaskResultMinViewCell"];
|
||||
[self.tableView registerClass:[MaskResultShareViewCell class] forCellReuseIdentifier:@"MaskResultShareViewCell"];
|
||||
|
||||
// if (@available(iOS 11.0, *)) {
|
||||
// self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||
//
|
||||
//
|
||||
// } else {
|
||||
//
|
||||
// self.automaticallyAdjustsScrollViewInsets = NO;
|
||||
// }
|
||||
|
||||
|
||||
if (!self.model) {
|
||||
[self addNavTitile:@"历史测试"];
|
||||
[self requstLatestTestData];
|
||||
}else{
|
||||
[self addNavTitile:@"测试结果"];
|
||||
}
|
||||
|
||||
NC_ADD_TARGET_NAME_OBJECT(self, @selector(usershareSuccessNoti), NC_UseShareSuccessNoti, nil);
|
||||
[self initUserAvator];
|
||||
|
||||
//重写返回按钮
|
||||
UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
backBtn.frame = CGRectMake(0, 0, 40, 40);
|
||||
[backBtn setImage:[UIImage imageNamed:@"btn_moment_back"] forState:UIControlStateNormal];
|
||||
[backBtn setImageEdgeInsets:UIEdgeInsetsMake(0,-14, 0, 14)];
|
||||
//backBtn.backgroundColor = [UIColor redColor];
|
||||
[backBtn addTarget:self action:@selector(backItemAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithCustomView:backBtn];
|
||||
self.navigationItem.leftBarButtonItem = backItem;
|
||||
|
||||
}
|
||||
|
||||
|
||||
//重写返回事件
|
||||
- (void)backItemAction{
|
||||
if (_isfromshouYE) {
|
||||
[self.navigationController popToRootViewControllerAnimated:YES];
|
||||
|
||||
}else{
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
}
|
||||
- (void)viewDidAppear:(BOOL)animated{
|
||||
[super viewDidAppear:animated];
|
||||
|
||||
if (_isfromshouYE) {
|
||||
|
||||
if([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
|
||||
self.navigationController.interactivePopGestureRecognizer.enabled = NO;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
- (void)viewWillDisappear:(BOOL)animated{
|
||||
[super viewWillDisappear:animated];
|
||||
if (_isfromshouYE) {
|
||||
if([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
|
||||
self.navigationController.interactivePopGestureRecognizer.enabled = YES;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-(void)dealloc{
|
||||
NC_REMOVE_NAME(self, NC_UseShareSuccessNoti, nil);
|
||||
}
|
||||
|
||||
-(void)initUserAvator{
|
||||
|
||||
//rightItem
|
||||
UIButton *rightBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
rightBtn.frame = CGRectMake(0, 0, 40, 40);
|
||||
rightBtn.layer.masksToBounds = YES;
|
||||
rightBtn.layer.cornerRadius = 20;
|
||||
[rightBtn setImage:[UIImage imageNamed:@"nav_circle_avatar"] forState:UIControlStateNormal];
|
||||
|
||||
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:rightBtn];
|
||||
|
||||
if ([[[UIDevice currentDevice] systemVersion] doubleValue] >= 11.0) {
|
||||
[rightBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
|
||||
make.size.mas_equalTo(CGSizeMake(40, 40));
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
BOOL isUserLogin = [GiGaUserDefault isUserLogin];
|
||||
if (isUserLogin) {
|
||||
GiGaUser *user = [[GiGaUserManager shareUser] getCurrentUser];
|
||||
if (user) {
|
||||
if (user.headImgUrl && ![user.headImgUrl isKindOfClass:[NSNull class]]) {
|
||||
NSURL *url = [NSURL URLWithString:user.headImgUrl];
|
||||
[rightBtn sd_setImageWithURL:url forState:UIControlStateNormal];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-(void)requstLatestTestData{
|
||||
|
||||
[self.view makeToastActivity:CSToastPositionCenter];
|
||||
@@ -139,8 +278,11 @@
|
||||
if (self.model == nil) {
|
||||
return 255;
|
||||
}
|
||||
CGFloat viewH = KMainH - SAFE_NAV_HEIGHT;
|
||||
CGFloat cellH = viewH / 3 ;
|
||||
if (KMainW < 375) {
|
||||
return 201;
|
||||
}
|
||||
CGFloat viewH = self.view.frame.size.height - SAFE_NAV_HEIGHT;
|
||||
CGFloat cellH = viewH / 3;
|
||||
return cellH;
|
||||
}
|
||||
|
||||
@@ -160,16 +302,17 @@
|
||||
GIGA_ShowToast(@"未安装微信");
|
||||
return;
|
||||
}
|
||||
|
||||
UIImage *image = [UIImage saveLongImage:self.tableView];
|
||||
|
||||
[self showFinalShareView];
|
||||
UIImage *image = [UIImage saveNavsuitImage:self.tableView];
|
||||
//[[GiGaFileNanager shareInstance] saveImaeToAlBum:image];
|
||||
[self jxt_showActionSheetWithTitle:@"分享微信" message:@"" appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
|
||||
[self jxt_showActionSheetWithTitle:@"分享到微信" message:@"" appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
|
||||
|
||||
alertMaker.addActionDefaultTitle(@"朋友");
|
||||
alertMaker.addActionDefaultTitle(@"微信好友");
|
||||
alertMaker.addActionDefaultTitle(@"朋友圈");
|
||||
alertMaker.addActionCancelTitle(@"取消");
|
||||
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
|
||||
|
||||
[self hidSomeViews];
|
||||
if (buttonIndex==0) {
|
||||
//好友
|
||||
[self shareImagToWX:image scene:WXSceneSession];
|
||||
@@ -178,9 +321,30 @@
|
||||
}else if (buttonIndex==1){
|
||||
// 朋友圈
|
||||
[self shareImagToWX:image scene:WXSceneTimeline];
|
||||
}else{
|
||||
GILog(@"取消");
|
||||
|
||||
}
|
||||
}];
|
||||
}
|
||||
-(void)hidSomeViews{
|
||||
MaskResultShareViewCell *cell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:2 inSection:0]];
|
||||
cell.qrcodeImage.hidden = YES;
|
||||
cell.shareBtn.hidden = NO;
|
||||
cell.lastLabe.text = @"让更多的朋友一起加入面膜时间吧!";
|
||||
self.tabheader.hidden = YES;
|
||||
|
||||
}
|
||||
-(void)showFinalShareView{
|
||||
|
||||
MaskResultShareViewCell *cell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:2 inSection:0]];
|
||||
cell.qrcodeImage.hidden = NO;
|
||||
cell.shareBtn.hidden = YES;
|
||||
cell.lastLabe.text = @"长按扫描二维码,测试你的肤质";
|
||||
self.tabheader.hidden = NO;
|
||||
|
||||
|
||||
}
|
||||
|
||||
-(void)shareImagToWX:(UIImage *)image scene:(int)scene{
|
||||
WXMediaMessage *msg = [WXMediaMessage message];
|
||||
@@ -207,15 +371,20 @@
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
//分享成功
|
||||
-(void)usershareSuccessNoti{
|
||||
|
||||
//GIGA_ShowToast(@"分享成功");
|
||||
if (_isfromshouYE) {
|
||||
[self.navigationController popToRootViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-(void)testBtnAction{
|
||||
|
||||
[self.navigationController popToRootViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
twoLabel.textColor = GIGARGB(240, 147, 147, 0.1);
|
||||
twoLabel.alpha = 0.6;
|
||||
twoLabel.font = GIGA_TEXTFONTMEDIUM(200);
|
||||
|
||||
//oneLabel.backgroundColor = [UIColor redColor];
|
||||
[self addSubview:twoLabel];
|
||||
self.twoLabel = twoLabel;
|
||||
@@ -42,29 +43,55 @@
|
||||
make.bottom.mas_equalTo(self.mas_bottom);
|
||||
}];
|
||||
|
||||
UILabel *jianyiLabel = [[UILabel alloc] init];
|
||||
//jianyiLabel.backgroundColor = [UIColor redColor];
|
||||
jianyiLabel.text = @"建议敷面膜时间";
|
||||
jianyiLabel.textColor = [UIColor blackColor];
|
||||
jianyiLabel.font = GIGA_TEXTFONTBOLD(24);
|
||||
[self addSubview:jianyiLabel];
|
||||
[jianyiLabel sizeToFit];
|
||||
|
||||
[jianyiLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
UIImageView *jianyiImageView = [[UIImageView alloc] init];
|
||||
jianyiImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
jianyiImageView.image = [UIImage imageNamed:@"share_tim"];
|
||||
[self addSubview:jianyiImageView];
|
||||
[jianyiImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.mas_left).offset(40);
|
||||
make.top.mas_equalTo(self.mas_top).offset(36);
|
||||
if (KMainW < 375) {
|
||||
make.size.mas_equalTo(CGSizeMake(139, 30));
|
||||
}else{
|
||||
make.size.mas_equalTo(CGSizeMake(179, 30));
|
||||
}
|
||||
|
||||
}];
|
||||
|
||||
//时间⌚️
|
||||
UILabel *timeLabel = [[UILabel alloc] init];
|
||||
timeLabel.textColor = [UIColor blackColor];
|
||||
timeLabel.font = GIGA_TEXTFONTBOLD(35);
|
||||
timeLabel.text = @"17分钟";
|
||||
if (KMainW < 375) {
|
||||
timeLabel.font = GIGA_TEXTFONTBOLD(24);
|
||||
}else{
|
||||
timeLabel.font = GIGA_TEXTFONTBOLD(35);
|
||||
}
|
||||
timeLabel.text = @"17";
|
||||
self.timeLabel = timeLabel;
|
||||
[self addSubview:timeLabel];
|
||||
[timeLabel sizeToFit];
|
||||
[timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.mas_left).offset(73);
|
||||
make.top.mas_equalTo(jianyiLabel.mas_bottom).offset(20);
|
||||
make.top.mas_equalTo(jianyiImageView.mas_bottom).offset(20);
|
||||
}];
|
||||
|
||||
//分钟图片
|
||||
UIImageView *minueImageview = [[UIImageView alloc] init];
|
||||
minueImageview.image = [UIImage imageNamed:@"share_minute"];
|
||||
minueImageview.contentMode = UIViewContentModeScaleAspectFit;
|
||||
[self addSubview:minueImageview];
|
||||
[minueImageview mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
|
||||
make.left.mas_equalTo(timeLabel.mas_right);
|
||||
if (KMainW < 375) {
|
||||
//se 5s
|
||||
make.size.mas_equalTo(CGSizeMake(48, 49));
|
||||
|
||||
}else{
|
||||
make.size.mas_equalTo(CGSizeMake(72, 49));
|
||||
}
|
||||
|
||||
make.centerY.mas_equalTo(timeLabel.mas_centerY);
|
||||
}];
|
||||
|
||||
//左侧红色梯形区域
|
||||
@@ -91,7 +118,8 @@
|
||||
|
||||
}];
|
||||
|
||||
[self bringSubviewToFront:jianyiLabel];
|
||||
[self bringSubviewToFront:jianyiImageView];
|
||||
[self bringSubviewToFront:minueImageview];
|
||||
[self bringSubviewToFront:timeLabel];
|
||||
|
||||
}
|
||||
@@ -128,7 +156,7 @@
|
||||
if ([minute isKindOfClass:[NSNull class]]) {
|
||||
minute = @"17";
|
||||
}
|
||||
NSString *time = [NSString stringWithFormat:@"%@分钟",minute];
|
||||
NSString *time = [NSString stringWithFormat:@"%@",minute];
|
||||
self.timeLabel.text = time;
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,11 @@
|
||||
UILabel *duibiLabel = [[UILabel alloc] init];
|
||||
duibiLabel.text = @"皮肤水油比";
|
||||
duibiLabel.textColor = GIGARGB(55, 55, 55, 1);
|
||||
duibiLabel.font = GIGA_TEXTFONTBOLD(24);
|
||||
if (KMainW < 375) {
|
||||
duibiLabel.font = GIGA_TEXTFONTBOLD(20);
|
||||
}else{
|
||||
duibiLabel.font = GIGA_TEXTFONTBOLD(24);
|
||||
}
|
||||
[self addSubview:duibiLabel];
|
||||
[duibiLabel sizeToFit];
|
||||
[duibiLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
-(void)kidTitle:(MaskTestResult *)model;
|
||||
@property (nonatomic,strong) UILabel *candLabe;
|
||||
|
||||
@property (nonatomic,strong) UIImageView *qrcodeImage;
|
||||
@property (nonatomic,strong) UILabel *lastLabe;
|
||||
|
||||
@end
|
||||
|
||||
@@ -38,13 +38,18 @@
|
||||
UILabel *candLabe = [[UILabel alloc] init];
|
||||
candLabe.textColor = [UIColor blackColor];
|
||||
candLabe.text = @"全效型";
|
||||
candLabe.font = GIGA_TEXTFONTBOLD(30);
|
||||
if (KMainW < 375) {
|
||||
candLabe.font = GIGA_TEXTFONTBOLD(20);
|
||||
}else{
|
||||
candLabe.font = GIGA_TEXTFONTBOLD(30);
|
||||
}
|
||||
|
||||
self.candLabe = candLabe;
|
||||
[self addSubview:candLabe];
|
||||
[candLabe sizeToFit];
|
||||
[candLabe mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(shiheLabe.mas_right);
|
||||
make.top.mas_equalTo(self.mas_top).offset(30);
|
||||
make.centerY.mas_equalTo(shiheLabe.mas_centerY);
|
||||
}];
|
||||
//小图标
|
||||
NSArray * imagesArr = @[@"result_water",@"result_moon",@"result_push"];
|
||||
@@ -82,7 +87,31 @@
|
||||
[logo mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.mas_left).offset(26);
|
||||
make.size.mas_equalTo(CGSizeMake(36, 36));
|
||||
make.top.mas_equalTo(shareBtn.mas_bottom).offset(7);
|
||||
|
||||
if (KMainW < 375) {
|
||||
make.top.mas_equalTo(self.mas_bottom).offset(-33);
|
||||
}else{
|
||||
make.top.mas_equalTo(self.mas_bottom).offset(-21);
|
||||
}
|
||||
|
||||
}];
|
||||
|
||||
UIImageView *qrcodeImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"applink"]];
|
||||
|
||||
[self addSubview:qrcodeImage];
|
||||
self.qrcodeImage = qrcodeImage;
|
||||
self.qrcodeImage.hidden = YES;
|
||||
|
||||
[qrcodeImage mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
if (KMainW < 375) {
|
||||
make.size.mas_equalTo(CGSizeMake(60, 60));
|
||||
make.right.mas_equalTo(self.mas_right).offset(-10);
|
||||
}else{
|
||||
make.size.mas_equalTo(CGSizeMake(85, 85));
|
||||
make.right.mas_equalTo(self.mas_right).offset(-25);
|
||||
}
|
||||
make.bottom.mas_equalTo(self.mas_bottom).offset(15);
|
||||
|
||||
}];
|
||||
|
||||
UILabel *lastLabe = [[UILabel alloc] init];
|
||||
@@ -90,11 +119,13 @@
|
||||
lastLabe.font = GIGA_TEXTFONTBOLD(12);
|
||||
lastLabe.textColor = GIGARGB(166, 33, 33, 1);
|
||||
[self addSubview:lastLabe];
|
||||
self.lastLabe = lastLabe;
|
||||
[lastLabe sizeToFit];
|
||||
|
||||
[lastLabe mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
|
||||
make.centerY.mas_equalTo(logo.mas_centerY);
|
||||
make.centerX.mas_equalTo(self.mas_centerX);
|
||||
make.top.mas_equalTo(shareBtn.mas_bottom).offset(15);
|
||||
}];
|
||||
|
||||
//3
|
||||
|
||||
@@ -17,5 +17,6 @@
|
||||
@property(nonatomic,copy) NSString *monthMaskNum;
|
||||
@property(nonatomic,copy) NSString *msg;
|
||||
@property(nonatomic,copy) NSString *totalMaskNum;
|
||||
@property(nonatomic,copy) NSString *productImgUrl;
|
||||
|
||||
@end
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// ShareCustomIamgeModel.h
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/29.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface ShareCustomIamgeModel : NSObject
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// ShareCustomIamgeModel.m
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/29.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import "ShareCustomIamgeModel.h"
|
||||
|
||||
@implementation ShareCustomIamgeModel
|
||||
|
||||
@end
|
||||
@@ -110,7 +110,7 @@ static const CGFloat kInputViewH = 44.f;
|
||||
if (self.SendCommentHandler) {
|
||||
self.SendCommentHandler(self.inputTextField.text);
|
||||
}
|
||||
|
||||
self.inputTextField.text = @"";
|
||||
if (![self.inputTextField isFirstResponder]) return;
|
||||
[self dismissKeyboard];
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
// UIImage *imag = [ZXingWrapper createCodeWithString:@"giga" size:CGSizeMake(170, 170) CodeFomart:kBarcodeFormatQRCode];
|
||||
|
||||
UIImage *imag = [UIImage createQrImageWith:[UIImage imageNamed:@"result_logo"] logoSize:CGSizeZero qrText:@"jijia"];
|
||||
self.codeImageVIew.image = imag;
|
||||
// UIImage *imag = [UIImage createQrImageWith:[UIImage imageNamed:@"result_logo"] logoSize:CGSizeZero qrText:@"jijia"];
|
||||
// self.codeImageVIew.image = imag;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
|
||||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.14"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
@@ -23,17 +22,20 @@
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="做精致女人" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LJO-K7-zpZ">
|
||||
<rect key="frame" x="33" y="32" width="85" height="24"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="17"/>
|
||||
<color key="textColor" red="0.2156862745" green="0.2156862745" blue="0.2156862745" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="从现在开始给皮肤最好的呵护" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6i0-MD-I2r">
|
||||
<rect key="frame" x="33" y="58" width="221" height="24"/>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="从现在开始悉心呵护你的肌肤" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6i0-MD-I2r">
|
||||
<rect key="frame" x="33" y="58" width="191" height="49"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="49" id="rnk-Oe-LEL"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="17"/>
|
||||
<color key="textColor" red="0.2156862745" green="0.2156862745" blue="0.2156862745" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="GOk-wH-zsa">
|
||||
<rect key="frame" x="33" y="103" width="100" height="4"/>
|
||||
<rect key="frame" x="33" y="128" width="100" height="4"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="100" id="HgT-jl-BEp"/>
|
||||
@@ -41,7 +43,7 @@
|
||||
</constraints>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="长按识别二维码一起加入面膜时间吧" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ema-eN-n8K">
|
||||
<rect key="frame" x="33" y="86" width="160" height="14"/>
|
||||
<rect key="frame" x="33" y="111" width="160" height="14"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="10"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
@@ -52,7 +54,7 @@
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="tq8-in-Amj">
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="applink" translatesAutoresizingMaskIntoConstraints="NO" id="tq8-in-Amj">
|
||||
<rect key="frame" x="226" y="15" width="85" height="85"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="85" id="dP3-Bc-Lp3"/>
|
||||
@@ -72,6 +74,7 @@
|
||||
<constraint firstItem="GOk-wH-zsa" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leadingMargin" constant="17" id="feu-CD-ceE"/>
|
||||
<constraint firstItem="6i0-MD-I2r" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="33" id="fsa-Yg-uQP"/>
|
||||
<constraint firstItem="Ema-eN-n8K" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="33" id="im1-OZ-dbX"/>
|
||||
<constraint firstItem="tq8-in-Amj" firstAttribute="leading" secondItem="6i0-MD-I2r" secondAttribute="trailing" constant="2" id="lvs-3e-K8e"/>
|
||||
<constraint firstAttribute="trailing" secondItem="tq8-in-Amj" secondAttribute="trailing" constant="9" id="yPL-AS-Ahb"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
@@ -79,6 +82,10 @@
|
||||
<connections>
|
||||
<outlet property="codeImageVIew" destination="tq8-in-Amj" id="Axa-dF-svf"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="137.59999999999999" y="151.12443778110946"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="applink" width="300" height="300"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
<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="皮肤保养度超过" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QzN-Xb-uz3">
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="我的精致超过了" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QzN-Xb-uz3">
|
||||
<rect key="frame" x="101" y="107" width="84" height="17"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="84" id="KCi-Px-w1F"/>
|
||||
@@ -80,13 +80,13 @@
|
||||
<color key="textColor" red="0.2156862745" green="0.2156862745" blue="0.2156862745" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="总计用时" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pKf-Uc-fSs">
|
||||
<rect key="frame" x="218" y="107" width="48" height="17"/>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="本月敷面膜" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pKf-Uc-fSs">
|
||||
<rect key="frame" x="206" y="107" width="60" height="17"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="12"/>
|
||||
<color key="textColor" red="0.2156862745" green="0.2156862745" blue="0.2156862745" 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="raB-J7-45m">
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="张" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="raB-J7-45m">
|
||||
<rect key="frame" x="245" y="158" width="21" height="17"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="17" id="MEd-UN-o3r"/>
|
||||
|
||||
@@ -11,5 +11,7 @@
|
||||
@interface MaskTimeShareViewCell : UITableViewCell
|
||||
@property (weak, nonatomic) IBOutlet UILabel *doinglabel;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *shareLabe;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *descLabe;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.14"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
@@ -23,26 +23,26 @@
|
||||
<rect key="frame" x="112" y="25" width="185" height="85"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="现在做些什么呢?" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rO9-ia-OyA">
|
||||
<rect key="frame" x="31" y="168" width="112" height="20"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="14"/>
|
||||
<rect key="frame" x="31" y="168" width="128" height="22.5"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="16"/>
|
||||
<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="What are we doing now?" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ajv-9T-Bcf">
|
||||
<rect key="frame" x="31" y="195" width="142" height="17"/>
|
||||
<rect key="frame" x="31" y="197.5" width="142" height="17"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Semibold" family="PingFang SC" pointSize="12"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="share_two" translatesAutoresizingMaskIntoConstraints="NO" id="27f-OZ-xO3">
|
||||
<rect key="frame" x="33" y="224" width="198" height="35"/>
|
||||
<rect key="frame" x="33" y="226.5" width="198" height="35"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="198" id="kws-RO-ZT9"/>
|
||||
<constraint firstAttribute="height" constant="35" id="zzS-Dk-zsi"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<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"/>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="share_one" translatesAutoresizingMaskIntoConstraints="NO" id="dlk-Er-Voj">
|
||||
<rect key="frame" x="42" y="231.5" width="162" height="19"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="19" id="JLN-Jh-Gue"/>
|
||||
<constraint firstAttribute="width" constant="162" id="L4g-bl-Q8T"/>
|
||||
@@ -64,6 +64,7 @@
|
||||
</tableViewCellContentView>
|
||||
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
|
||||
<connections>
|
||||
<outlet property="descLabe" destination="rO9-ia-OyA" id="gVT-gy-RXY"/>
|
||||
<outlet property="doinglabel" destination="ajv-9T-Bcf" id="Le0-Q8-0zg"/>
|
||||
<outlet property="shareLabe" destination="dlk-Er-Voj" id="iWt-Wf-6y7"/>
|
||||
</connections>
|
||||
@@ -72,7 +73,7 @@
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="share_logo" width="185" height="85"/>
|
||||
<image name="share_oneblack" width="133" height="17"/>
|
||||
<image name="share_one" width="133" height="17"/>
|
||||
<image name="share_two" width="155" height="35"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
||||
@@ -231,11 +231,15 @@
|
||||
}
|
||||
|
||||
-(void)stop{
|
||||
|
||||
self.isMoving = NO;
|
||||
self.progress = 0 ;
|
||||
self.currentTimeinterval = 0;
|
||||
[self.displayLink invalidate];
|
||||
self.displayLink = nil;
|
||||
[self.timer destoryTimer];
|
||||
[self.playTimer invalidate];
|
||||
self.playTimer = nil;
|
||||
}
|
||||
|
||||
//calculate angle between start to point
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.14"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
@@ -25,7 +25,7 @@
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="OSF-Gb-h1M">
|
||||
<rect key="frame" x="6" y="12" width="329" height="217"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bg_logo" translatesAutoresizingMaskIntoConstraints="NO" id="iJy-9p-48y">
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bg_logo" translatesAutoresizingMaskIntoConstraints="NO" id="iJy-9p-48y">
|
||||
<rect key="frame" x="8" y="8" width="313" height="175"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="175" id="0Jj-uy-CDT"/>
|
||||
@@ -52,13 +52,13 @@
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="17min" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="H5z-ZV-VGm">
|
||||
<rect key="frame" x="35" y="17" width="28" height="14"/>
|
||||
<rect key="frame" x="35" y="17.5" width="28" height="14"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Semibold" family="PingFang SC" pointSize="10"/>
|
||||
<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">
|
||||
<rect key="frame" x="193" y="17" width="111" height="14"/>
|
||||
<rect key="frame" x="193" y="17.5" 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"/>
|
||||
<nil key="highlightedColor"/>
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
<color key="textColor" red="0.2156862745" green="0.2156862745" blue="0.2156862745" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="皮肤保养度超过" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Tme-2V-NlI">
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="我的精致超过了" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Tme-2V-NlI">
|
||||
<rect key="frame" x="128.5" y="89" width="84" height="17"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="12"/>
|
||||
<color key="textColor" red="0.2156862745" green="0.2156862745" blue="0.2156862745" alpha="1" colorSpace="calibratedRGB"/>
|
||||
@@ -89,8 +89,8 @@
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="总计用时" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="j6s-4L-8FL">
|
||||
<rect key="frame" x="279" y="89" width="48" height="17"/>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="本月敷面膜" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="j6s-4L-8FL">
|
||||
<rect key="frame" x="267" y="89" width="60" height="17"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="12"/>
|
||||
<color key="textColor" red="0.2156862745" green="0.2156862745" blue="0.2156862745" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
@@ -111,7 +111,7 @@
|
||||
<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="dic-3G-CvO">
|
||||
<rect key="frame" x="311" y="139" width="21" height="17"/>
|
||||
<rect key="frame" x="314" 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,7 +137,7 @@
|
||||
<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="9" id="Lb3-Ut-P6Z"/>
|
||||
<constraint firstAttribute="trailing" secondItem="dic-3G-CvO" secondAttribute="trailing" constant="6" 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"/>
|
||||
@@ -146,7 +146,7 @@
|
||||
<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="1" id="rVx-wc-qRN"/>
|
||||
<constraint firstItem="dic-3G-CvO" firstAttribute="leading" secondItem="Yd8-h2-8ZW" secondAttribute="trailing" constant="4" 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"/>
|
||||
|
||||
@@ -53,7 +53,12 @@ typedef NS_ENUM(NSUInteger, GYTitlePosition) {
|
||||
_textLabel.textAlignment = NSTextAlignmentCenter;
|
||||
|
||||
_textLabel.textColor = [UIColor whiteColor];
|
||||
_textLabel.font = GIGA_TEXTFONTMEDIUM(13);
|
||||
if (KMainW < 375) {
|
||||
_textLabel.font = GIGA_TEXTFONTMEDIUM(10);
|
||||
}else{
|
||||
_textLabel.font = GIGA_TEXTFONTMEDIUM(12);
|
||||
}
|
||||
|
||||
[self.layer addSublayer:_textLabel.layer];
|
||||
|
||||
self.clipsToBounds = NO; /*保证文字不跑出视图YES*/
|
||||
|
||||
Reference in New Issue
Block a user