This commit is contained in:
lianxiang
2018-10-18 17:02:29 +08:00
parent 94ce6d3e14
commit 52222aa995
16 changed files with 103 additions and 75 deletions
@@ -108,7 +108,9 @@
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]];
//[cell.holdImagView sd_setImageWithURL:[NSURL URLWithString:self.model.productImgUrl]];
[cell.holdImagView sd_setImageWithURL:[NSURL URLWithString:self.model.productImgUrl] placeholderImage:[UIImage imageNamed:@"img_product"]];
}
}
@@ -257,7 +257,7 @@
[self setUpNav];
[self initUI];
[self addNotify];
//[self creatBackGroundMusic];
[self creatBackGroundMusic];
[self creatMaskTimeSatrtMusic];
}
@@ -266,7 +266,7 @@
-(void)maskupSwipeGesture{
[self animaMask];
}
#pragma mark 点击手势结束面膜时间
#pragma mark 点击手势面膜时间
-(void)maskTapAction{
[self animaMask];
}
@@ -284,18 +284,17 @@
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
if (buttonIndex == 1) {
[self.cicleProgressView stop];
//手动结束时结束peding通知
[[GiGaLocalNotificationManager localNotifiationCenter] cancelAllLocalNoitification];
[self maskTimeEnd];
}
}];
}
#pragma mark - 开始面膜时间动画 合并
-(void)animaMask{
self.swipeGaurdimagView.hidden = YES;
self.startMaskButton.hidden = YES;
[self.view layoutIfNeeded];
@@ -506,7 +505,7 @@
}
delegate.isMasking = YES;
[_startMaskMusic play];
//[_musicPalyer play];
[_musicPalyer play];
// [self setBackGroundPlayingInfo];//锁屏音频信息
//总时间隔 s
@@ -568,13 +567,12 @@
//面膜时间结束时设置 全局变量 不再发送本地通知 提醒
AppDelegate *delegate =(AppDelegate *) [[UIApplication sharedApplication] delegate];
delegate.isMasking = NO;
//[_musicPalyer stop];
[_musicPalyer stop];
//震动 需用户手动开启震动模式
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
//复原动画
[self endMaskAnimation];
}
#pragma mark 开始测试
@@ -744,8 +742,11 @@
-(void)refreshUserIcon:(NSString *)imageUrl{
NSURL *url = [NSURL URLWithString:imageUrl];
[self.rightNavUserBtn sd_setImageWithURL:url forState:UIControlStateNormal];
// [self.rightNavUserBtn sd_setImageWithURL:url forState:UIControlStateNormal];
[self.rightNavUserBtn sd_setImageWithURL:url forState:UIControlStateNormal placeholderImage:[UIImage imageNamed:@"nav_circle_avatar"] completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
}];
}
#pragma mark 消息 action
@@ -870,8 +871,10 @@
BOOL isUserLogin = [GiGaUserDefault isUserLogin];
if (isUserLogin) {
NSTimeInterval timeInterVal = [GiGaUserDefault getUserMaskeTime];
NSString *minute = [NSString stringWithFormat:@"%.f",timeInterVal /60];
NSString *minute = [NSString stringWithFormat:@"%.1f",timeInterVal / 60];
GiGaBaseAPiRequest *api = [GiGaBaseAPiRequest initWithRequestPath:KApiBeginMaskTime method:RequestPostMethod parms:@{@"minute":minute}];
[api requstDataWithResult:^(GiGaAPIResult *result) {
if (result.success) {
@@ -141,8 +141,7 @@
}
}
return cell;
}
else if (indexPath.row == 2){
}else if (indexPath.row == 2){
MaskShareBoootomViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MaskShareBoootomViewCell"];
if (!cell) {
cell = [[[NSBundle mainBundle] loadNibNamed:@"MaskShareBoootomViewCell" owner:self options:nil] lastObject];
@@ -403,7 +402,9 @@
}
}
return _viewControllers;
}
@end
@@ -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="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bg_logo" translatesAutoresizingMaskIntoConstraints="NO" id="iJy-9p-48y">
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="img_product" 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"/>
@@ -107,7 +107,7 @@
</tableViewCell>
</objects>
<resources>
<image name="bg_logo" width="88" height="88"/>
<image name="img_product" width="164" height="121"/>
<image name="masktie_clock" width="20" height="19"/>
</resources>
</document>