2015-11-10 54 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此之前應做。