2015-11-10 48 views
1

我正在使用具有透明导航栏的用户界面。我用这个如何推UITableview到导航栏下?

[self.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault]; 
[self.navigationController.navigationBar setShadowImage:[UIImage new]]; 
[self.navigationController.navigationBar setTranslucent:YES]; 

现在我想的UITableView应该从顶部开始,而不是像64 偏移如何实现这一目标?

+0

隐藏此特定视图的导航栏 – VRAwesome

回答

0

您可以在故事板或xib属性面板中设置它。

enter image description here

或者你可以如下操作:

[self setAutomaticallyAdjustsScrollViewInsets:YES]; 
[self setEdgesForExtendedLayout:UIRectEdgeAll]; 

调用viewWillAppear此之前应做。