Commit 346ff412b1a7b98ea71e9a093202840bf8473882
1 parent
77452635
no message
Showing
3 changed files
with
7 additions
and
5 deletions
CNLiveSettingModule/Classes/Privacy/CNLivePrivacyHeaderView.m
| ... | ... | @@ -15,6 +15,8 @@ |
| 15 | 15 | |
| 16 | 16 | @end |
| 17 | 17 | @implementation CNLivePrivacyHeaderView |
| 18 | +static const NSInteger margin = 10; | |
| 19 | + | |
| 18 | 20 | - (id)initWithReuseIdentifier:(NSString *)reuseIdentifier { |
| 19 | 21 | if (self = [super initWithReuseIdentifier:reuseIdentifier]) { |
| 20 | 22 | self.backgroundColor = [UIColor grayColor]; |
| ... | ... | @@ -27,8 +29,8 @@ |
| 27 | 29 | - (void)createUI{ |
| 28 | 30 | [self.contentView addSubview:self.titleLabel]; |
| 29 | 31 | [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { |
| 30 | - make.left.mas_equalTo(self.contentView).mas_offset(10); | |
| 31 | - make.right.mas_equalTo(self.contentView).mas_offset(-10); | |
| 32 | + make.left.mas_equalTo(self.contentView).mas_offset(margin); | |
| 33 | + make.right.mas_equalTo(self.contentView).mas_offset(-margin); | |
| 32 | 34 | make.bottom.mas_equalTo(self.contentView).mas_offset(-5); |
| 33 | 35 | |
| 34 | 36 | }]; | ... | ... |
CNLiveSettingModule/Classes/Privacy/CNLivePrivacyTableViewCell.m
| ... | ... | @@ -56,10 +56,10 @@ static const NSInteger margin = 12; |
| 56 | 56 | make.right.equalTo(self.contentView).offset(-margin); |
| 57 | 57 | }]; |
| 58 | 58 | [self.notifiSwitch mas_makeConstraints:^(MASConstraintMaker *make) { |
| 59 | + // UISwithch的大小无效.默认大小 51.0f 31.0f) | |
| 59 | 60 | make.centerY.mas_equalTo(self.contentView); |
| 60 | 61 | make.right.equalTo(self.contentView).offset(-margin); |
| 61 | - make.width.mas_equalTo(47); | |
| 62 | - make.height.mas_equalTo(29); | |
| 62 | + | |
| 63 | 63 | }]; |
| 64 | 64 | } |
| 65 | 65 | ... | ... |
CNLiveSettingModule/Classes/View/CNLiveSettingCell.m
| ... | ... | @@ -95,7 +95,7 @@ static const NSInteger margin = 12; |
| 95 | 95 | _switchOn.hidden = NO; |
| 96 | 96 | [_switchOn mas_updateConstraints:^(MASConstraintMaker *make) { |
| 97 | 97 | // UISwithch的大小无效.默认大小 51.0f 31.0f) |
| 98 | - make.top.equalTo(self.line.mas_bottom).with.offset(margin); | |
| 98 | + make.centerY.mas_equalTo(self.contentView); | |
| 99 | 99 | make.right.equalTo(self.line.mas_right).with.offset(-margin); |
| 100 | 100 | |
| 101 | 101 | }]; | ... | ... |