This commit is contained in:
2025-11-07 15:03:45 +08:00
parent 074596ebcb
commit 6e969648c6
14 changed files with 160 additions and 5 deletions

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "home_hg_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "home_hg_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "微信图片_20251107143422_215_763.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "微信图片_20251107143422_215_763 1.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "home_person_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "home_person_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "微信图片_20251107143423_216_763.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "微信图片_20251107143423_216_763 1.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -14,6 +14,13 @@
@property (nonatomic, strong) KBDirectionIndicatorView *indicator; @property (nonatomic, strong) KBDirectionIndicatorView *indicator;
// //
@property (nonatomic, strong) UIView *topBar; @property (nonatomic, strong) UIView *topBar;
@property (nonatomic, strong) UIView *contentView;
@property (nonatomic, strong) UIImageView *leftImageView;
@property (nonatomic, strong) UIImageView *rightImageView;
/// 👑
@property (nonatomic, strong) UIImageView *hgImageView;
@property (nonatomic, strong) UIButton *hotButton; @property (nonatomic, strong) UIButton *hotButton;
@property (nonatomic, strong) UIButton *rankButton; @property (nonatomic, strong) UIButton *rankButton;
@property (nonatomic, strong) UIView *underlineView; // 线 @property (nonatomic, strong) UIView *underlineView; // 线
@@ -34,6 +41,30 @@
// HWBackgroundConfig *config = [HWBackgroundConfig configWithBehavior:HWBackgroundBehaviorDefault]; // HWBackgroundConfig *config = [HWBackgroundConfig configWithBehavior:HWBackgroundBehaviorDefault];
// config.backgroundAlpha = 0; // config.backgroundAlpha = 0;
// [self.hw_dimmedView reloadConfig:config]; // [self.hw_dimmedView reloadConfig:config];
//
[self addSubview:self.contentView];
[self.contentView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(self).inset(16);
make.top.equalTo(self).offset(48);
make.bottom.equalTo(self);
}];
[self.contentView addSubview:self.leftImageView];
[self.contentView addSubview:self.rightImageView];
[self.leftImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(self.contentView);
make.top.equalTo(self.contentView);
make.height.mas_equalTo(79);
}];
[self.rightImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(self.contentView);
make.top.equalTo(self.contentView);
make.height.equalTo(self.leftImageView);
}];
// + // +
[self setupTopButtonsAndContainer]; [self setupTopButtonsAndContainer];
// //
@@ -43,9 +74,9 @@
} }
- (HWBackgroundConfig *)backgroundConfig { - (HWBackgroundConfig *)backgroundConfig {
// return [HWBackgroundConfig configWithBehavior:HWBackgroundBehaviorSystemVisualEffect];
HWBackgroundConfig *config = [HWBackgroundConfig configWithBehavior:HWBackgroundBehaviorDefault]; HWBackgroundConfig *config = [HWBackgroundConfig configWithBehavior:HWBackgroundBehaviorDefault];
config.backgroundAlpha = 0; config.backgroundAlpha = 0;
config.blurTintColor = [UIColor clearColor];
return config; return config;
} }
@@ -142,7 +173,7 @@
- (void)setupTopButtonsAndContainer { - (void)setupTopButtonsAndContainer {
// //
self.topBar = [[UIView alloc] init]; self.topBar = [[UIView alloc] init];
self.topBar.backgroundColor = [UIColor colorWithWhite:1 alpha:0.9]; // self.topBar.backgroundColor = [UIColor colorWithWhite:1 alpha:0.9];
[self addSubview:self.topBar]; [self addSubview:self.topBar];
// //
// self.topBar.alpha = 0.0; // self.topBar.alpha = 0.0;
@@ -174,12 +205,12 @@
// //
self.containerView = [[UIView alloc] init]; self.containerView = [[UIView alloc] init];
self.containerView.backgroundColor = [UIColor whiteColor]; self.containerView.backgroundColor = [UIColor redColor];
self.containerView.clipsToBounds = YES; self.containerView.clipsToBounds = YES;
[self addSubview:self.containerView]; [self addSubview:self.containerView];
// Masonry // Masonry
CGFloat topPadding = 12; // CGFloat topPadding = 47; //
[self.topBar mas_makeConstraints:^(MASConstraintMaker *make) { [self.topBar mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(self); make.left.right.equalTo(self);
make.top.equalTo(self).offset(topPadding); make.top.equalTo(self).offset(topPadding);
@@ -280,4 +311,40 @@
[self.topBar layoutIfNeeded]; [self.topBar layoutIfNeeded];
} }
} }
- (UIView *)contentView{
if (!_contentView) {
_contentView = [[UIView alloc] init];
}
return _contentView;
}
- (UIImageView *)leftImageView{
if (!_leftImageView) {
_leftImageView = [[UIImageView alloc] init];
_leftImageView.image = [UIImage imageNamed:@"home_left_image"];
_leftImageView.contentMode = UIViewContentModeScaleToFill;
}
return _leftImageView;
}
- (UIImageView *)rightImageView{
if (!_rightImageView) {
_rightImageView = [[UIImageView alloc] init];
_rightImageView.image = [UIImage imageNamed:@"home_right_image"];
_rightImageView.contentMode = UIViewContentModeScaleToFill;
_rightImageView.hidden = true;
}
return _rightImageView;
}
- (UIImageView *)hgImageView{
if (!_hgImageView) {
_hgImageView = [[UIImageView alloc] init];
_hgImageView.image = [UIImage imageNamed:@"home_hg_icon"];
_hgImageView.contentMode = UIViewContentModeScaleToFill;
}
return _hgImageView;
}
@end @end

View File

@@ -25,7 +25,7 @@
self.titles = @[@"螃蟹啊斯柯达积分卡", @"小龙虾", @"苹果", @"胡萝卜", @"葡萄", @"西瓜"]; self.titles = @[@"螃蟹啊斯柯达积分卡", @"小龙虾", @"苹果", @"胡萝卜", @"葡萄", @"西瓜"];
[self.view addSubview:self.myCategoryView]; [self.view addSubview:self.myCategoryView];
[self.view addSubview:self.listContainerView]; [self.view addSubview:self.listContainerView];
// self.listContainerView.scrollView.scrollEnabled = false; self.listContainerView.scrollView.scrollEnabled = false;
NSArray *imageNames = @[@"crab", @"lobster", @"apple", @"carrot", @"grape", @"watermelon"]; NSArray *imageNames = @[@"crab", @"lobster", @"apple", @"carrot", @"grape", @"watermelon"];
NSArray *selectedImageNames = @[@"crab_selected", @"lobster_selected", @"apple_selected", @"carrot_selected", @"grape_selected", @"watermelon_selected"]; NSArray *selectedImageNames = @[@"crab_selected", @"lobster_selected", @"apple_selected", @"carrot_selected", @"grape_selected", @"watermelon_selected"];