Commit 3d87c87b cgx

修复系统设置页面、账户与资料UI显示bug

1 个父辈 ee2940f6
...@@ -21,14 +21,15 @@ ...@@ -21,14 +21,15 @@
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
self.dk_backgroundColorPicker = DKColorPickerWithColors(DSWhite, CornerViewDarkColor, DSWhite); self.dk_backgroundColorPicker = DKColorPickerWithColors(DSWhite, CornerViewDarkColor, DSWhite);
self.accessoryView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"moreIcon"]]; self.rightIcon = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"moreIcon"]];
[self.contentView addSubview:self.rightIcon];
self.titleLab = [UILabel dkLabWithFont:SysFont(15.0)]; self.titleLab = [UILabel dkLabWithFont:SysFont(15.0)];
[self addSubview:self.titleLab]; [self.contentView addSubview:self.titleLab];
self.detailLab = [UILabel labWithFont:SysFont(14.0)]; self.detailLab = [UILabel labWithFont:SysFont(14.0)];
self.detailLab.dk_textColorPicker = DKColorPickerWithColors(SubTitleColor, ColorFromHex(0x8C8F9D), DSWhite); self.detailLab.dk_textColorPicker = DKColorPickerWithColors(SubTitleColor, ColorFromHex(0x8C8F9D), DSWhite);
[self addSubview:self.detailLab]; [self.contentView addSubview:self.detailLab];
} }
return self; return self;
} }
...@@ -46,12 +47,16 @@ ...@@ -46,12 +47,16 @@
[self.detailLab sizeToFit]; [self.detailLab sizeToFit];
[self.titleLab mas_makeConstraints:^(MASConstraintMaker *make) { [self.titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self).offset(15); make.left.equalTo(self.contentView).offset(15);
make.centerY.equalTo(self); make.centerY.equalTo(self.contentView);
}]; }];
[self.detailLab mas_makeConstraints:^(MASConstraintMaker *make) { [self.detailLab mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self.accessoryView.mas_left).offset(-8); make.right.equalTo(self.rightIcon.mas_left).offset(-8);
make.centerY.equalTo(self); make.centerY.equalTo(self.contentView);
}];
[self.rightIcon mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(self.contentView);
make.right.equalTo(self.contentView).offset(-8);
}]; }];
} }
......
...@@ -43,14 +43,15 @@ ...@@ -43,14 +43,15 @@
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
self.dk_backgroundColorPicker = DKColorPickerWithColors(DSWhite, CornerViewDarkColor, DSWhite); self.dk_backgroundColorPicker = DKColorPickerWithColors(DSWhite, CornerViewDarkColor, DSWhite);
self.accessoryView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"moreIcon"]]; self.rightIcon = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"moreIcon"]];
[self.contentView addSubview:self.rightIcon];
self.titleLab = [UILabel dkLabWithFont:SysFont(15.0)]; self.titleLab = [UILabel dkLabWithFont:SysFont(15.0)];
[self addSubview:self.titleLab]; [self.contentView addSubview:self.titleLab];
self.detailLab = [UILabel labWithFont:SysFont(14.0)]; self.detailLab = [UILabel labWithFont:SysFont(14.0)];
self.detailLab.dk_textColorPicker = DKColorPickerWithColors(SubTitleColor, ColorFromHex(0x8C8F9D), DSWhite); self.detailLab.dk_textColorPicker = DKColorPickerWithColors(SubTitleColor, ColorFromHex(0x8C8F9D), DSWhite);
[self addSubview:self.detailLab]; [self.contentView addSubview:self.detailLab];
} }
return self; return self;
} }
...@@ -68,12 +69,16 @@ ...@@ -68,12 +69,16 @@
[self.detailLab sizeToFit]; [self.detailLab sizeToFit];
[self.titleLab mas_makeConstraints:^(MASConstraintMaker *make) { [self.titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self).offset(15); make.left.equalTo(self.contentView).offset(15);
make.centerY.equalTo(self); make.centerY.equalTo(self.contentView);
}]; }];
[self.detailLab mas_makeConstraints:^(MASConstraintMaker *make) { [self.detailLab mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self.accessoryView.mas_left).offset(-8); make.right.equalTo(self.rightIcon.mas_left).offset(-8);
make.centerY.equalTo(self); make.centerY.equalTo(self.contentView);
}];
[self.rightIcon mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(self.contentView);
make.right.equalTo(self.contentView).offset(-8);
}]; }];
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!