Commit 559a04f9 by 李威

海菲秀保养

parent 53ecd4ee
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "组 61@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "组 61@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "清洁@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "清洁@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
......@@ -277,10 +277,12 @@
weakSelf.isNeedUpkeep = [responseObject[@"data"] boolValue];
if(weakSelf.isNeedUpkeep){
[weakSelf showUpkeepAlert];
//[weakSelf showUpkeepAlert];
weakSelf.myView.byBtn.hidden = NO;
weakSelf.myView.startUpkeepBtn.hidden = NO;
}else{
weakSelf.myView.byBtn.hidden = YES;
weakSelf.myView.startUpkeepBtn.hidden = YES;
}
} fail:^(id failMessage) {
......
......@@ -99,6 +99,8 @@ typedef enum : NSUInteger{
@property (nonatomic,assign) BOOL is041;
@property (nonatomic,strong)UIButton *startUpkeepBtn;
- (void)controlWithItem:(UIButton *)sender;
@end
......
......@@ -167,29 +167,29 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
- (void)creatUI{
self.backgroundColor = XHColorRGB(247, 247, 247);
_byBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_byBtn setTitle:HJLocalizedString(@"建议本次使用结束后进行设备保养") forState:UIControlStateNormal];
[_byBtn addTarget:self action:@selector(controlWithItem:) forControlEvents:UIControlEventTouchUpInside];
_byBtn.tag = Itembaoyang;
[_byBtn setImage:[UIImage imageNamed:@"HFX_froget"] forState:UIControlStateNormal];
_byBtn.backgroundColor = XHColorRGB(252, 214, 214);
[_byBtn setTitleColor:XHColorRGB(175, 44, 35) forState:UIControlStateNormal];
_byBtn.titleLabel.font = XHFontSize(12);
_byBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
_byBtn.semanticContentAttribute = UISemanticContentAttributeForceRightToLeft;
_byBtn.titleEdgeInsets = UIEdgeInsetsMake(0, 20, 0, 0);
_byBtn.imageEdgeInsets = UIEdgeInsetsMake(0, _byBtn.titleLabel.bounds.size.width + 25, 0, -(_byBtn.titleLabel.bounds.size.width + 10));
[self addSubview:_byBtn];
[_byBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.equalTo(self);
make.height.equalTo(@25);
}];
self.byBtn.hidden = YES;
// _byBtn = [UIButton buttonWithType:UIButtonTypeCustom];
// [_byBtn setTitle:HJLocalizedString(@"建议本次使用结束后进行设备保养") forState:UIControlStateNormal];
// [_byBtn addTarget:self action:@selector(controlWithItem:) forControlEvents:UIControlEventTouchUpInside];
// _byBtn.tag = Itembaoyang;
// [_byBtn setImage:[UIImage imageNamed:@"HFX_froget"] forState:UIControlStateNormal];
// _byBtn.backgroundColor = XHColorRGB(252, 214, 214);
// [_byBtn setTitleColor:XHColorRGB(175, 44, 35) forState:UIControlStateNormal];
// _byBtn.titleLabel.font = XHFontSize(12);
// _byBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
// _byBtn.semanticContentAttribute = UISemanticContentAttributeForceRightToLeft;
// _byBtn.titleEdgeInsets = UIEdgeInsetsMake(0, 20, 0, 0);
// _byBtn.imageEdgeInsets = UIEdgeInsetsMake(0, _byBtn.titleLabel.bounds.size.width + 25, 0, -(_byBtn.titleLabel.bounds.size.width + 10));
// [self addSubview:_byBtn];
// [_byBtn mas_makeConstraints:^(MASConstraintMaker *make) {
// make.left.right.top.equalTo(self);
// make.height.equalTo(@25);
// }];
// self.byBtn.hidden = YES;
UIView *centerLine = [UIView new];
[self addSubview:centerLine];
[centerLine mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.byBtn.mas_bottom).offset(22 *IPhone6ScaleHeight);
make.top.equalTo(self).offset(22 *IPhone6ScaleHeight);
make.centerX.equalTo(self);
make.size.mas_equalTo(CGSizeMake(0.1, 0.1));
}];
......@@ -640,7 +640,29 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
_speedStressLb.textColor = XHColorRGB_Alpha(198, 195, 195, 1);
_speedStressTitleLb.textColor = XHColorRGB_Alpha(198, 195, 195, 1);
[self setTimeLineWithString:_currentVideoList[0].describeInfo];
_startUpkeepBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_startUpkeepBtn setBackgroundImage:[UIImage imageNamed:@"HFX_upkeepBackBtn"] forState:UIControlStateNormal];
[_startUpkeepBtn setImage:[UIImage imageNamed:@"HFX_upkeepBtn"] forState:UIControlStateNormal];
[_startUpkeepBtn setTitle:[NSString stringWithFormat:@" %@",HJLocalizedString(@"立即进行设备保养")] forState:UIControlStateNormal];
[_startUpkeepBtn setTitleColor:XHColorRGB_Alpha(164, 47, 36, 1) forState:UIControlStateNormal];
_startUpkeepBtn.titleLabel.font = XHFontSizeBold(14);
_startUpkeepBtn.hidden = YES;
[_startUpkeepBtn addTarget:self action:@selector(startUpkeepClik:) forControlEvents:UIControlEventTouchUpInside];
[self addSubview:_startUpkeepBtn];
[_startUpkeepBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.centerX.equalTo(self);
make.size.mas_equalTo(CGSizeMake(334, 67));
make.bottom.mas_equalTo(-35);
}];
}
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch{
if ([touch.view isDescendantOfView:self.collectionView]) {
if ([self.collectionView indexPathForItemAtPoint:[touch locationInView:self.collectionView]]) {
......@@ -957,6 +979,13 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
[self.delegate deviceControlWithTag:sender.tag];
}
}
-(void)startUpkeepClik:(UIButton *)button {
if(self.delegate && [self.delegate respondsToSelector:@selector(deviceControlWithTag:)]){
[self.delegate deviceControlWithTag:Itembaoyang];
}
}
- (void)changeVolume:(UIButton *)sender{
sender.selected = !sender.selected;
self.playerView.currentPlayerManager.muted = !sender.selected;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment