Commit 346ff412b1a7b98ea71e9a093202840bf8473882

Authored by zhangxiaowen
1 parent 77452635

no message

CNLiveSettingModule/Classes/Privacy/CNLivePrivacyHeaderView.m
@@ -15,6 +15,8 @@ @@ -15,6 +15,8 @@
15 15
16 @end 16 @end
17 @implementation CNLivePrivacyHeaderView 17 @implementation CNLivePrivacyHeaderView
  18 +static const NSInteger margin = 10;
  19 +
18 - (id)initWithReuseIdentifier:(NSString *)reuseIdentifier { 20 - (id)initWithReuseIdentifier:(NSString *)reuseIdentifier {
19 if (self = [super initWithReuseIdentifier:reuseIdentifier]) { 21 if (self = [super initWithReuseIdentifier:reuseIdentifier]) {
20 self.backgroundColor = [UIColor grayColor]; 22 self.backgroundColor = [UIColor grayColor];
@@ -27,8 +29,8 @@ @@ -27,8 +29,8 @@
27 - (void)createUI{ 29 - (void)createUI{
28 [self.contentView addSubview:self.titleLabel]; 30 [self.contentView addSubview:self.titleLabel];
29 [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { 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 make.bottom.mas_equalTo(self.contentView).mas_offset(-5); 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,10 +56,10 @@ static const NSInteger margin = 12;
56 make.right.equalTo(self.contentView).offset(-margin); 56 make.right.equalTo(self.contentView).offset(-margin);
57 }]; 57 }];
58 [self.notifiSwitch mas_makeConstraints:^(MASConstraintMaker *make) { 58 [self.notifiSwitch mas_makeConstraints:^(MASConstraintMaker *make) {
  59 + // UISwithch的大小无效.默认大小 51.0f 31.0f)
59 make.centerY.mas_equalTo(self.contentView); 60 make.centerY.mas_equalTo(self.contentView);
60 make.right.equalTo(self.contentView).offset(-margin); 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,7 +95,7 @@ static const NSInteger margin = 12;
95 _switchOn.hidden = NO; 95 _switchOn.hidden = NO;
96 [_switchOn mas_updateConstraints:^(MASConstraintMaker *make) { 96 [_switchOn mas_updateConstraints:^(MASConstraintMaker *make) {
97 // UISwithch的大小无效.默认大小 51.0f 31.0f) 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 make.right.equalTo(self.line.mas_right).with.offset(-margin); 99 make.right.equalTo(self.line.mas_right).with.offset(-margin);
100 100
101 }]; 101 }];