fix color
This commit is contained in:
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
- (instancetype)initWithFrame:(CGRect)frame {
|
- (instancetype)initWithFrame:(CGRect)frame {
|
||||||
if (self = [super initWithFrame:frame]) {
|
if (self = [super initWithFrame:frame]) {
|
||||||
self.backgroundColor = [UIColor colorWithHex:0xF2F6FA]; // 淡色背景
|
self.backgroundColor = [UIColor clearColor]; // 透明,露出底部背景图
|
||||||
|
|
||||||
[self addSubview:self.titleLabel];
|
[self addSubview:self.titleLabel];
|
||||||
[self addSubview:self.keyboardBtn];
|
[self addSubview:self.keyboardBtn];
|
||||||
|
|||||||
@@ -15,13 +15,21 @@
|
|||||||
@property (nonatomic, strong) BaseTableView *tableView; // 列表
|
@property (nonatomic, strong) BaseTableView *tableView; // 列表
|
||||||
@property (nonatomic, strong) KBMyHeaderView *header; // 顶部视图
|
@property (nonatomic, strong) KBMyHeaderView *header; // 顶部视图
|
||||||
@property (nonatomic, strong) NSArray<NSArray<NSDictionary *> *> *data; // 分组数据
|
@property (nonatomic, strong) NSArray<NSArray<NSDictionary *> *> *data; // 分组数据
|
||||||
|
@property (nonatomic, strong) UIImageView *bgImageView; // 全屏背景图
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation MyVC
|
@implementation MyVC
|
||||||
|
|
||||||
- (void)viewDidLoad {
|
- (void)viewDidLoad {
|
||||||
[super viewDidLoad];
|
[super viewDidLoad];
|
||||||
self.view.backgroundColor = [UIColor colorWithHex:0xF5F7FB];
|
// 背景图
|
||||||
|
self.view.backgroundColor = UIColor.clearColor;
|
||||||
|
self.bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"my_bg_icon"]];
|
||||||
|
self.bgImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||||
|
[self.view addSubview:self.bgImageView];
|
||||||
|
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.edges.equalTo(self.view);
|
||||||
|
}];
|
||||||
|
|
||||||
// 数据源(title + SF Symbols 名称 + 色值),分两组
|
// 数据源(title + SF Symbols 名称 + 色值),分两组
|
||||||
self.data = @[
|
self.data = @[
|
||||||
@@ -40,6 +48,7 @@
|
|||||||
|
|
||||||
// tableHeaderView 需要设置 frame,约束不会自动生效
|
// tableHeaderView 需要设置 frame,约束不会自动生效
|
||||||
self.header = [[KBMyHeaderView alloc] initWithFrame:CGRectMake(0, 0, KB_SCREEN_WIDTH, 357)];
|
self.header = [[KBMyHeaderView alloc] initWithFrame:CGRectMake(0, 0, KB_SCREEN_WIDTH, 357)];
|
||||||
|
self.header.backgroundColor = UIColor.clearColor; // 透明,显示背景图
|
||||||
self.tableView.tableHeaderView = self.header;
|
self.tableView.tableHeaderView = self.header;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,7 +106,8 @@
|
|||||||
- (BaseTableView *)tableView {
|
- (BaseTableView *)tableView {
|
||||||
if (!_tableView) {
|
if (!_tableView) {
|
||||||
_tableView = [[BaseTableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
|
_tableView = [[BaseTableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
|
||||||
_tableView.backgroundColor = [UIColor colorWithHex:0xF5F7FB];
|
_tableView.backgroundColor = UIColor.clearColor; // 透明
|
||||||
|
_tableView.opaque = NO;
|
||||||
_tableView.delegate = self;
|
_tableView.delegate = self;
|
||||||
_tableView.dataSource = self;
|
_tableView.dataSource = self;
|
||||||
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone; // 关闭系统分割线
|
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone; // 关闭系统分割线
|
||||||
|
|||||||
Reference in New Issue
Block a user