|
|
@@ -9,8 +9,16 @@
|
|
|
|
|
|
@interface editTypeBottomView ()
|
|
|
@property(nonatomic,strong) UIButton*leftButton;
|
|
|
+@property(nonatomic,strong) UIImageView*leftImageV;
|
|
|
+@property(nonatomic,strong) UILabel *leftLabel;
|
|
|
+
|
|
|
@property(nonatomic,strong) UIButton*rightButton;
|
|
|
+@property(nonatomic,strong) UIImageView*rightImageV;
|
|
|
+@property(nonatomic,strong) UILabel *rightLabel;
|
|
|
+
|
|
|
@property(nonatomic,strong) UIButton*midButton;
|
|
|
+@property(nonatomic,strong) UIImageView*midImageV;
|
|
|
+@property(nonatomic,strong) UILabel *midLabel;
|
|
|
@end
|
|
|
|
|
|
@implementation editTypeBottomView
|
|
|
@@ -38,25 +46,25 @@
|
|
|
make.top.mas_equalTo(0);
|
|
|
}];
|
|
|
|
|
|
- UIImageView *leftImageV = [[UIImageView alloc] init];
|
|
|
- leftImageV.image = [UIImage imageNamed:@"edit_download_icon"];
|
|
|
- [_leftButton addSubview:leftImageV];
|
|
|
+ _leftImageV = [[UIImageView alloc] init];
|
|
|
+ _leftImageV.image = [UIImage imageNamed:@"edit_download_icon"];
|
|
|
+ [_leftButton addSubview:_leftImageV];
|
|
|
|
|
|
- [leftImageV mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+ [_leftImageV mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.width.mas_equalTo(25);
|
|
|
make.height.mas_equalTo(25);
|
|
|
make.centerX.equalTo(_leftButton.mas_centerX);
|
|
|
make.centerY.equalTo(_leftButton.mas_centerY).offset(-10);
|
|
|
}];
|
|
|
|
|
|
- UILabel *leftLabel = [[UILabel alloc] init];
|
|
|
- leftLabel.textColor = [UIColor hwColor:@"#0A132B"];
|
|
|
- leftLabel.textAlignment = NSTextAlignmentCenter;
|
|
|
- leftLabel.font = [UIFont systemFontOfSize:12.0];
|
|
|
- leftLabel.text = NSLocalizedString(@"my_set_no_File_download",nil);
|
|
|
- [_leftButton addSubview:leftLabel];
|
|
|
+ _leftLabel = [[UILabel alloc] init];
|
|
|
+ _leftLabel.textColor = [UIColor hwColor:@"#0A132B"];
|
|
|
+ _leftLabel.textAlignment = NSTextAlignmentCenter;
|
|
|
+ _leftLabel.font = [UIFont systemFontOfSize:12.0];
|
|
|
+ _leftLabel.text = NSLocalizedString(@"my_set_no_File_download",nil);
|
|
|
+ [_leftButton addSubview:_leftLabel];
|
|
|
|
|
|
- [leftLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+ [_leftLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.width.mas_equalTo(curButFullWidth);
|
|
|
make.height.mas_equalTo(25);
|
|
|
make.centerX.equalTo(_leftButton.mas_centerX);
|
|
|
@@ -75,25 +83,25 @@
|
|
|
make.top.mas_equalTo(0);
|
|
|
}];
|
|
|
|
|
|
- UIImageView *midImageV = [[UIImageView alloc] init];
|
|
|
- midImageV.image = [UIImage imageNamed:@"edit_share_icon"];
|
|
|
- [_midButton addSubview:midImageV];
|
|
|
+ _midImageV = [[UIImageView alloc] init];
|
|
|
+ _midImageV.image = [UIImage imageNamed:@"edit_share_icon"];
|
|
|
+ [_midButton addSubview:_midImageV];
|
|
|
|
|
|
- [midImageV mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+ [_midImageV mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.width.mas_equalTo(25);
|
|
|
make.height.mas_equalTo(25);
|
|
|
make.centerX.equalTo(_midButton.mas_centerX);
|
|
|
make.centerY.equalTo(_midButton.mas_centerY).offset(-10);
|
|
|
}];
|
|
|
|
|
|
- UILabel *midLabel = [[UILabel alloc] init];
|
|
|
- midLabel.textColor = [UIColor hwColor:@"#0A132B"];
|
|
|
- midLabel.textAlignment = NSTextAlignmentCenter;
|
|
|
- midLabel.font = [UIFont systemFontOfSize:12.0];
|
|
|
- midLabel.text = NSLocalizedString(@"common_edit_share",nil);
|
|
|
- [_midButton addSubview:midLabel];
|
|
|
+ _midLabel = [[UILabel alloc] init];
|
|
|
+ _midLabel.textColor = [UIColor hwColor:@"#0A132B"];
|
|
|
+ _midLabel.textAlignment = NSTextAlignmentCenter;
|
|
|
+ _midLabel.font = [UIFont systemFontOfSize:12.0];
|
|
|
+ _midLabel.text = NSLocalizedString(@"common_edit_share",nil);
|
|
|
+ [_midButton addSubview:_midLabel];
|
|
|
|
|
|
- [midLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+ [_midLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.width.mas_equalTo(curButFullWidth);
|
|
|
make.height.mas_equalTo(25);
|
|
|
make.centerX.equalTo(_midButton.mas_centerX);
|
|
|
@@ -113,25 +121,25 @@
|
|
|
make.top.mas_equalTo(0);
|
|
|
}];
|
|
|
|
|
|
- UIImageView *rightImageV = [[UIImageView alloc] init];
|
|
|
- rightImageV.image = [UIImage imageNamed:@"edit_del_icon"];
|
|
|
- [_rightButton addSubview:rightImageV];
|
|
|
+ _rightImageV = [[UIImageView alloc] init];
|
|
|
+ _rightImageV.image = [UIImage imageNamed:@"edit_del_icon"];
|
|
|
+ [_rightButton addSubview:_rightImageV];
|
|
|
|
|
|
- [rightImageV mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+ [_rightImageV mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.width.mas_equalTo(25);
|
|
|
make.height.mas_equalTo(25);
|
|
|
make.centerX.equalTo(_rightButton.mas_centerX);
|
|
|
make.centerY.equalTo(_rightButton.mas_centerY).offset(-10);
|
|
|
}];
|
|
|
|
|
|
- UILabel *rightLabel = [[UILabel alloc] init];
|
|
|
- rightLabel.textColor = [UIColor hwColor:@"#0A132B"];
|
|
|
- rightLabel.textAlignment = NSTextAlignmentCenter;
|
|
|
- rightLabel.font = [UIFont systemFontOfSize:12.0];
|
|
|
- rightLabel.text = NSLocalizedString(@"File_upload_Record_delete",nil);
|
|
|
- [_rightButton addSubview:rightLabel];
|
|
|
+ _rightLabel = [[UILabel alloc] init];
|
|
|
+ _rightLabel.textColor = [UIColor hwColor:@"#0A132B"];
|
|
|
+ _rightLabel.textAlignment = NSTextAlignmentCenter;
|
|
|
+ _rightLabel.font = [UIFont systemFontOfSize:12.0];
|
|
|
+ _rightLabel.text = NSLocalizedString(@"File_upload_Record_delete",nil);
|
|
|
+ [_rightButton addSubview:_rightLabel];
|
|
|
|
|
|
- [rightLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+ [_rightLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.width.mas_equalTo(curButFullWidth);
|
|
|
make.height.mas_equalTo(25);
|
|
|
make.centerX.equalTo(_rightButton.mas_centerX);
|
|
|
@@ -216,4 +224,37 @@
|
|
|
}];
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+- (void)setIsBlackType:(BOOL)isBlackType
|
|
|
+{
|
|
|
+ _isBlackType = isBlackType;
|
|
|
+ if(isBlackType){
|
|
|
+ self.backgroundColor = [UIColor clearColor];
|
|
|
+
|
|
|
+ // gradient
|
|
|
+ CAGradientLayer *gl = [CAGradientLayer layer];
|
|
|
+ gl.frame = CGRectMake(0,0,SCREEN_W,60 + AdaptTabHeight);
|
|
|
+ gl.startPoint = CGPointMake(0.5, 0);
|
|
|
+ gl.endPoint = CGPointMake(0.5, 1);
|
|
|
+ gl.colors = @[(__bridge id)[UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.0].CGColor, (__bridge id)[UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:1.0].CGColor];
|
|
|
+ gl.locations = @[@(0), @(1.0f)];
|
|
|
+ //[self.layer addSublayer:gl];
|
|
|
+ [self.layer insertSublayer:gl atIndex:0];
|
|
|
+
|
|
|
+ self.layer.shadowColor = [UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.0200].CGColor;
|
|
|
+ self.layer.shadowOffset = CGSizeMake(0,-1);
|
|
|
+ self.layer.shadowOpacity = 1;
|
|
|
+ self.layer.shadowRadius = 1;
|
|
|
+
|
|
|
+ //
|
|
|
+ _leftImageV.image = [UIImage imageNamed:@"edit_download_white_icon"];
|
|
|
+ _leftLabel.textColor = [UIColor whiteColor];
|
|
|
+
|
|
|
+ _midImageV.image = [UIImage imageNamed:@"edit_share_white_icon"];
|
|
|
+ _midLabel.textColor = [UIColor whiteColor];
|
|
|
+
|
|
|
+ _rightImageV.image = [UIImage imageNamed:@"edit_del_white_icon"];
|
|
|
+ _rightLabel.textColor = [UIColor whiteColor];
|
|
|
+ }
|
|
|
+}
|
|
|
@end
|