补充部分 UI 验收问题
This commit is contained in:
@@ -106,6 +106,12 @@
|
||||
_tagModel = tagModel;
|
||||
self.flagImageView.imageUrl = tagModel.icon;
|
||||
self.titleLabel.text = tagModel.name;
|
||||
|
||||
[self.flagImageView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(14);
|
||||
make.centerY.mas_equalTo(self.contentView);
|
||||
make.size.mas_equalTo(CGSizeMake(40, 30));
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)setRegionModel:(RegionListInfo *)regionModel {
|
||||
|
@@ -203,7 +203,7 @@
|
||||
self.redPacketModel = self.redPacketList.firstObject;
|
||||
self.hidden = NO;
|
||||
self.pi_redNum = @(self.redPacketList.count).stringValue;
|
||||
if(self.delegate && [self.delegate respondsToSelector:@selector(openRedPacketWithModelopenRedPacketWithModelopenRedPacketWithModel:)]){
|
||||
if(self.delegate && [self.delegate respondsToSelector:@selector(openRedPacketWithModel:)]){
|
||||
[self.delegate openRedPacketWithModel:self.redPacketModel];
|
||||
}
|
||||
return;
|
||||
@@ -226,7 +226,7 @@
|
||||
}
|
||||
[self.redPacketList replaceObjectAtIndex:[self.redPacketList indexOfObject:self.redPacketModel] withObject:redModel];
|
||||
self.redPacketModel = redModel;
|
||||
if(self.delegate && [self.delegate respondsToSelector:@selector(openRedPacketWithModelopenRedPacketWithModelopenRedPacketWithModel:)]){
|
||||
if(self.delegate && [self.delegate respondsToSelector:@selector(openRedPacketWithModel:)]){
|
||||
[self.delegate openRedPacketWithModel:self.redPacketModel];
|
||||
}
|
||||
}
|
||||
|
@@ -827,7 +827,7 @@
|
||||
@property(nonatomic, copy) NSArray <XPUserCardItemModel *>*models;
|
||||
@property(nonatomic, strong) UIStackView *iconStack;
|
||||
@property(nonatomic, strong) UIButton *pickButton;
|
||||
@property(nonatomic, strong) UIView *line;
|
||||
@property(nonatomic, strong) UIView *lineView;
|
||||
@property(nonatomic, copy) void(^handleTapIcon)(XPUserCardItemModel *model);
|
||||
@property(nonatomic, copy) void(^handleTapPick)(void);
|
||||
|
||||
@@ -867,16 +867,6 @@
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
if (self = [super initWithFrame:frame]) {
|
||||
|
||||
_line = [[UIView alloc] init];
|
||||
_line.backgroundColor = UIColorFromRGB(0xe4e4e4);
|
||||
[self.contentView addSubview:_line];
|
||||
[_line mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self.contentView);
|
||||
make.top.mas_equalTo(self.contentView).offset(1);
|
||||
make.width.mas_equalTo(self.contentView).offset(-30);
|
||||
make.height.mas_equalTo(1);
|
||||
}];
|
||||
|
||||
// // 1. 创建 UIScrollView
|
||||
// UIScrollView *scrollView = [[UIScrollView alloc] init];
|
||||
// scrollView.backgroundColor = [UIColor yellowColor];
|
||||
@@ -895,11 +885,18 @@
|
||||
|
||||
[self.contentView addSubview:self.iconStack];
|
||||
[self.iconStack mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.contentView).offset(10);
|
||||
make.centerX.mas_equalTo(self.contentView);
|
||||
// make.top.mas_equalTo(self.contentView).offset(10);
|
||||
make.center.mas_equalTo(self.contentView);
|
||||
make.width.lessThanOrEqualTo(self.contentView).offset(-30);
|
||||
}];
|
||||
|
||||
[self.contentView addSubview:self.lineView];
|
||||
// [self.line mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.centerX.mas_equalTo(self.contentView);
|
||||
// make.top.mas_equalTo(self.iconStack);
|
||||
// make.width.mas_equalTo(100);//.offset(-30);
|
||||
// make.height.mas_equalTo(10);
|
||||
// }];
|
||||
// 2. StackView 约束
|
||||
// [self.iconStack mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.edges.equalTo(scrollView); // 充满 ScrollView
|
||||
@@ -923,7 +920,7 @@
|
||||
- (void)setModels:(NSArray <XPUserCardItemModel *>*)models {
|
||||
_models = models;
|
||||
if (models.count == 0) {
|
||||
self.line.hidden = YES;
|
||||
// self.lineView.hidden = YES;
|
||||
return;
|
||||
}
|
||||
for (UIView *subview in self.iconStack.arrangedSubviews) {
|
||||
@@ -999,6 +996,14 @@
|
||||
return _pickButton;
|
||||
}
|
||||
|
||||
- (UIView *)lineView {
|
||||
if (!_lineView) {
|
||||
_lineView = [[UIView alloc] initWithFrame:CGRectMake(15, 0, KScreenWidth-30, 1)];
|
||||
_lineView.backgroundColor = UIColorFromRGB(0xe4e4e4);
|
||||
}
|
||||
return _lineView;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@interface UserRoomCardViewController () <UICollectionViewDelegateFlowLayout, UICollectionViewDataSource>
|
||||
|
Reference in New Issue
Block a user