Commit 0de1d2f3 authored by 汪洋's avatar 汪洋

itemView使用约束来控制

parent 2e4c2b63
......@@ -44,8 +44,7 @@
make.right.mas_equalTo(0);
make.height.offset(1/[UIScreen mainScreen].scale);
}];
_itemView = [[UIView alloc] initWithFrame:CGRectMake(0, [UIApplication sharedApplication].statusBarFrame.size.height, [UIScreen mainScreen].bounds.size.width, 44)];
_itemView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
_itemView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 44)];
CGFloat titleW = [UIScreen mainScreen].bounds.size.width - 80;
_titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(40, 0, titleW, 44)];
_titleLabel.lineBreakMode = NSLineBreakByTruncatingTail;
......@@ -74,6 +73,10 @@
[_itemView addSubview:_leftButton];
[_itemView addSubview:_rightButton];
[_itemView addSubview:_nearRightButton];
[_itemView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.mas_equalTo(0);
make.height.mas_equalTo(44);
}];
[_leftButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(20);
make.centerY.mas_equalTo(0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment