1
This commit is contained in:
21
keyBoard/Assets.xcassets/Home/home_left_bg.imageset/Contents.json
vendored
Normal file
21
keyBoard/Assets.xcassets/Home/home_left_bg.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"filename" : "home_left_bg.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
keyBoard/Assets.xcassets/Home/home_left_bg.imageset/home_left_bg.png
vendored
Normal file
BIN
keyBoard/Assets.xcassets/Home/home_left_bg.imageset/home_left_bg.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.5 KiB |
21
keyBoard/Assets.xcassets/Home/home_right_bg.imageset/Contents.json
vendored
Normal file
21
keyBoard/Assets.xcassets/Home/home_right_bg.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"filename" : "home_right_bg.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
keyBoard/Assets.xcassets/Home/home_right_bg.imageset/home_right_bg.png
vendored
Normal file
BIN
keyBoard/Assets.xcassets/Home/home_right_bg.imageset/home_right_bg.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.0 KiB |
@@ -44,7 +44,7 @@
|
|||||||
// 该背景色会被 HWPanModal 用来设置容器的 _contentView 背景色
|
// 该背景色会被 HWPanModal 用来设置容器的 _contentView 背景色
|
||||||
// 参考 Pods/HWPanModal/Sources/View/PanModal/HWPanModalContainerView.m: adjustPanContainerBackgroundColor
|
// 参考 Pods/HWPanModal/Sources/View/PanModal/HWPanModalContainerView.m: adjustPanContainerBackgroundColor
|
||||||
// 想要改变外层白色底(截图中 _contentView)的颜色,只需改这里即可
|
// 想要改变外层白色底(截图中 _contentView)的颜色,只需改这里即可
|
||||||
self.backgroundColor = [UIColor clearColor]; // 柔和的绿色
|
self.backgroundColor = [UIColor colorWithHex:0xE8FFF4]; // 柔和的绿色
|
||||||
// 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];
|
||||||
@@ -160,8 +160,6 @@
|
|||||||
|
|
||||||
// 添加最大的白色容器
|
// 添加最大的白色容器
|
||||||
[self addSubview:self.bigWhiteContentView];
|
[self addSubview:self.bigWhiteContentView];
|
||||||
[self addSubview:self.personImageView];
|
|
||||||
[self addSubview:self.hgImageView];
|
|
||||||
|
|
||||||
[self.bigWhiteContentView mas_makeConstraints:^(MASConstraintMaker *make) {
|
[self.bigWhiteContentView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.left.right.equalTo(self).inset(0);
|
make.left.right.equalTo(self).inset(0);
|
||||||
@@ -181,6 +179,10 @@
|
|||||||
[self.secWhiteContentView addSubview:self.topBar];
|
[self.secWhiteContentView addSubview:self.topBar];
|
||||||
[self.secWhiteContentView addSubview:self.containerView];
|
[self.secWhiteContentView addSubview:self.containerView];
|
||||||
|
|
||||||
|
// 调整层级:将人物与皇冠图添加到与 topBar 同一父视图,并放在 topBar 之下
|
||||||
|
[self.secWhiteContentView insertSubview:self.personImageView belowSubview:self.topBar];
|
||||||
|
[self.secWhiteContentView insertSubview:self.hgImageView belowSubview:self.topBar];
|
||||||
|
|
||||||
[self.topBar addSubview:self.leftImageView];
|
[self.topBar addSubview:self.leftImageView];
|
||||||
[self.topBar addSubview:self.rightImageView];
|
[self.topBar addSubview:self.rightImageView];
|
||||||
|
|
||||||
@@ -254,6 +256,7 @@
|
|||||||
}];
|
}];
|
||||||
|
|
||||||
[self.personImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
[self.personImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
// 仍按页面整体的左右边距定位,保持与改层级前的视觉一致
|
||||||
make.left.equalTo(self).offset(46);
|
make.left.equalTo(self).offset(46);
|
||||||
make.bottom.equalTo(self.topBar.mas_top).offset(22);
|
make.bottom.equalTo(self.topBar.mas_top).offset(22);
|
||||||
make.width.mas_equalTo(70);
|
make.width.mas_equalTo(70);
|
||||||
@@ -351,7 +354,8 @@
|
|||||||
_bigWhiteContentView = [[UIView alloc] init];
|
_bigWhiteContentView = [[UIView alloc] init];
|
||||||
_bigWhiteContentView.backgroundColor = [UIColor whiteColor];
|
_bigWhiteContentView.backgroundColor = [UIColor whiteColor];
|
||||||
_bigWhiteContentView.layer.cornerRadius = 40;
|
_bigWhiteContentView.layer.cornerRadius = 40;
|
||||||
_bigWhiteContentView.layer.masksToBounds = true;
|
// 不裁剪子视图,避免顶部装饰图越界部分被截断
|
||||||
|
_bigWhiteContentView.layer.masksToBounds = NO; // 等同于 clipsToBounds = NO
|
||||||
}
|
}
|
||||||
return _bigWhiteContentView;
|
return _bigWhiteContentView;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user