[英]iOS - Adding view under navigation bar
I can't add a view under UINavigationBar
(Navigation Controller), like the Facebook app. 我无法在
UINavigationBar
(导航控制器)下添加视图,例如Facebook应用程序。 Any ideas on how I can do this? 关于如何执行此操作的任何想法?
Best, Andrea 最好,安德里亚
The custom view looks like a tableHeaderView
. 自定义视图看起来像
tableHeaderView
。 Which means you need to set your view as the tableHeaderView
, which will then be placed on top of the tableView and underneath your navigation bar. 这意味着您需要将视图设置为
tableHeaderView
,然后将其放置在tableView顶部和导航栏下方。
UIView *customView = [[UIView alloc] initWithFrame:yourFrame];
self.tableView.tableHeaderView = customView;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.