添加homeheadView
This commit is contained in:
@@ -26,28 +26,28 @@
|
||||
[bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.equalTo(self.view);
|
||||
}];
|
||||
CGFloat topV = (500);
|
||||
// CGFloat topV = (500);
|
||||
|
||||
// [self.view addSubview:self.headView];
|
||||
// [self setupMas:topV];
|
||||
[self.view addSubview:self.headView];
|
||||
[self setupMas];
|
||||
// 创建sheetVC
|
||||
self.simplePanModalView = [[KBPanModalView alloc] init];
|
||||
// 使用宏,避免误写成函数指针判断导致恒为 true
|
||||
if (KB_DEVICE_HAS_NOTCH) {
|
||||
self.simplePanModalView.minHeight = KB_SCREEN_HEIGHT - topV - 34;
|
||||
self.simplePanModalView.minHeight = 473 - 44 + KB_NAV_TOTAL_HEIGHT;
|
||||
}else{
|
||||
self.simplePanModalView.minHeight = KB_SCREEN_HEIGHT - topV;
|
||||
self.simplePanModalView.minHeight = 473 - 44 + KB_NAV_TOTAL_HEIGHT;
|
||||
//
|
||||
}
|
||||
self.simplePanModalView.topInset = 100;
|
||||
[self.simplePanModalView presentInView:self.view];
|
||||
}
|
||||
|
||||
- (void)setupMas:(CGFloat)headViewTopV{
|
||||
- (void)setupMas{
|
||||
[self.headView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.equalTo(self.view);
|
||||
make.top.equalTo(self.view);
|
||||
make.height.mas_equalTo(headViewTopV);
|
||||
make.top.equalTo(self.view).offset(KB_NAV_TOTAL_HEIGHT);
|
||||
make.height.mas_equalTo(473 - 44);
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user