使UINavigationBar透明,TableView在其下面,可以扩大UITableView的视野.
1)
UIView *headerView = [[UIView alloc] initWithFrame: CGRectMake(0, 0, 320, 44)];
m_tableView.tableHeaderView = headerView;
2)
m_tableView.contentInset = UIEdgeInsetsMake(44, 0, 0, 0);
m_tableView.scrollIndicatorInsets = UIEdgeInsetsMake(44, 0, 0, 0);
使UITableView最上面留出UINavigationBar空间的两种方法
最新推荐文章于 2025-06-30 15:28:07 发布
本文介绍了一种让UINavigationBar变为透明的方法,通过调整UITableView的头部视图和内容偏移,使得TableView能够在导航栏下方显示,进而扩大了UITableView的可见范围。

3132

被折叠的 条评论
为什么被折叠?



