This commit is contained in:
2025-11-06 16:05:28 +08:00
parent 41aec6b89e
commit 1f45564539
10 changed files with 395 additions and 15 deletions

View File

@@ -0,0 +1,58 @@
//
// HomeMainVC.m
// keyBoard
//
// Created by Mac on 2025/11/6.
//
#import "HomeMainVC.h"
#import "HomeHeadView.h"
#import "KBPanModalView.h"
@interface HomeMainVC ()
@property (nonatomic, strong) HomeHeadView *headView;
@end
@implementation HomeMainVC
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor yellowColor];
CGFloat topV = (500);
// [self.view addSubview:self.headView];
// [self setupMas:topV];
// sheetVC
KBPanModalView *simplePanModalView = [[KBPanModalView alloc] init];
// 使 true
if (KB_DEVICE_HAS_NOTCH) {
simplePanModalView.minHeight = KB_SCREEN_HEIGHT - topV - 34;
}else{
simplePanModalView.minHeight = KB_SCREEN_HEIGHT - topV;
//
}
simplePanModalView.topInset = 100;
[simplePanModalView presentInView:self.view];
}
- (void)setupMas:(CGFloat)headViewTopV{
[self.headView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(self.view);
make.top.equalTo(self.view);
make.height.mas_equalTo(headViewTopV);
}];
}
#pragma mark - lazy
- (HomeHeadView *)headView{
if (!_headView) {
_headView = [[HomeHeadView alloc] init];
}
return _headView;
}
@end