Commit e56684ef1d0885ae4ff9bedacb5b9505b5ff05de
1 parent
0a4657fc
no message
Showing
1 changed file
with
8 additions
and
6 deletions
CNLiveSettingModule/Classes/Privacy/CNLiveNotSeeCell.m
| ... | ... | @@ -22,6 +22,8 @@ |
| 22 | 22 | @end |
| 23 | 23 | |
| 24 | 24 | @implementation CNLiveNotSeeCell |
| 25 | +static const NSInteger margin = 15; | |
| 26 | + | |
| 25 | 27 | - (instancetype)initWithFrame:(CGRect)frame { |
| 26 | 28 | self = [super initWithFrame:frame]; |
| 27 | 29 | if (self) { |
| ... | ... | @@ -65,6 +67,7 @@ |
| 65 | 67 | |
| 66 | 68 | } |
| 67 | 69 | } |
| 70 | + | |
| 68 | 71 | - (void)configSubviews { |
| 69 | 72 | [self.contentView addSubview:self.avatarImage]; |
| 70 | 73 | [self.contentView addSubview:self.nameLabel]; |
| ... | ... | @@ -72,26 +75,25 @@ |
| 72 | 75 | UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc]initWithTarget:self action:@selector(longPress:)]; |
| 73 | 76 | longPress.minimumPressDuration = 1; |
| 74 | 77 | [self.contentView addGestureRecognizer:longPress]; |
| 75 | - | |
| 76 | 78 | } |
| 77 | 79 | |
| 78 | 80 | #pragma mark - Layout |
| 79 | 81 | - (void)xw_layoutSubviews { |
| 80 | 82 | [self.avatarImage mas_makeConstraints:^(MASConstraintMaker *make) { |
| 81 | - make.top.mas_equalTo(self.contentView).offset(15); | |
| 83 | + make.top.mas_equalTo(self.contentView).offset(margin); | |
| 82 | 84 | make.centerX.mas_equalTo(self.contentView); |
| 83 | 85 | make.size.mas_equalTo(CGSizeMake(45, 45)); |
| 84 | 86 | }]; |
| 85 | 87 | |
| 86 | 88 | [self.delButton mas_makeConstraints:^(MASConstraintMaker *make) { |
| 87 | - make.top.mas_equalTo(self.contentView).offset(2.5);; | |
| 89 | + make.top.mas_equalTo(self.contentView).offset(3);; | |
| 88 | 90 | make.right.mas_equalTo(self.avatarImage.mas_left).offset(12.5); |
| 89 | - make.size.mas_equalTo(CGSizeMake(30, 30)); | |
| 91 | + make.size.mas_equalTo(CGSizeMake(20, 20)); | |
| 90 | 92 | }]; |
| 91 | 93 | |
| 92 | 94 | [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) { |
| 93 | 95 | make.centerX.mas_equalTo(self.contentView); |
| 94 | - make.bottom.mas_equalTo(self.contentView).offset(-15); | |
| 96 | + make.bottom.mas_equalTo(self.contentView).offset(-margin); | |
| 95 | 97 | make.left.and.right.mas_lessThanOrEqualTo(self.contentView); |
| 96 | 98 | }]; |
| 97 | 99 | |
| ... | ... | @@ -101,7 +103,7 @@ |
| 101 | 103 | if (!_delButton) { |
| 102 | 104 | _delButton = [UIButton buttonWithType:UIButtonTypeCustom]; |
| 103 | 105 | UIImage *image = [self getImageWithImageName:@"privacy_edit_minus" bundleName:@"CNLiveSettingModule" targetClass:[self class]]; |
| 104 | - [_delButton setImage:image forState:UIControlStateNormal]; | |
| 106 | + [_delButton setBackgroundImage:image forState:UIControlStateNormal]; | |
| 105 | 107 | [_delButton addTarget:self action:@selector(delButtonDidClicked:) forControlEvents:UIControlEventTouchUpInside]; |
| 106 | 108 | [_delButton setHidden:YES]; |
| 107 | 109 | ... | ... |