This commit is contained in:
2025-11-06 21:38:58 +08:00
parent 0d13192723
commit 0fa3d10284
15 changed files with 300 additions and 20 deletions

View File

@@ -11,6 +11,7 @@
@interface HomeMainVC ()
@property (nonatomic, strong) HomeHeadView *headView;
@property (nonatomic, strong) KBPanModalView *simplePanModalView;
@end
@@ -19,22 +20,32 @@
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor yellowColor];
// self.view.backgroundColor = [UIColor yellowColor];
UIImage *bgImage = [UIImage kb_gradientImageWithColors:@[[UIColor colorWithHex:0xE8FFF1], [UIColor colorWithHex:0xD4FDFF]] size:CGSizeMake(KB_SCREEN_WIDTH, KB_SCREEN_HEIGHT) direction:KBGradientDirectionTopToBottom];
UIImageView *bgImageView = [[UIImageView alloc] init];
bgImageView.image = bgImage;
[self.view addSubview:bgImageView];
[bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.view);
}];
CGFloat topV = (500);
// [self.view addSubview:self.headView];
// [self setupMas:topV];
// sheetVC
KBPanModalView *simplePanModalView = [[KBPanModalView alloc] init];
self.simplePanModalView = [[KBPanModalView alloc] init];
// 使 true
if (KB_DEVICE_HAS_NOTCH) {
simplePanModalView.minHeight = KB_SCREEN_HEIGHT - topV - 34;
self.simplePanModalView.minHeight = KB_SCREEN_HEIGHT - topV - 34;
}else{
simplePanModalView.minHeight = KB_SCREEN_HEIGHT - topV;
self.simplePanModalView.minHeight = KB_SCREEN_HEIGHT - topV;
//
}
simplePanModalView.topInset = 100;
[simplePanModalView presentInView:self.view];
self.simplePanModalView.topInset = 100;
[self.simplePanModalView presentInView:self.view];
HWBackgroundConfig *config = [HWBackgroundConfig configWithBehavior:HWBackgroundBehaviorDefault];
config.backgroundAlpha = 0;
[self.simplePanModalView.hw_dimmedView reloadConfig:config];
}
- (void)setupMas:(CGFloat)headViewTopV{

View File

@@ -35,7 +35,7 @@
self.view.backgroundColor = [UIColor redColor];
HWBackgroundConfig *config = [HWBackgroundConfig configWithBehavior:HWBackgroundBehaviorDefault];
config = [HWBackgroundConfig configWithBehavior:HWBackgroundBehaviorDefault];
config.backgroundAlpha = 0.01;
config.backgroundAlpha = 0.001;
[self.hw_dimmedView reloadConfig:config];
// +