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
|
||||
Reference in New Issue
Block a user