开发者

XIB tableview ignore the size of the tableview goes to full screen

开发者 https://www.devze.com 2023-03-13 00:10 出处:网络
I have a XIB with a nav bar at the top and the tableview directly under that.both of these are placed under a UIView.

I have a XIB with a nav bar at the top and the tableview directly under that. both of these are placed under a UIView.

If I change the color of the table in the IB and run that app, the color changes properly. So I assume that I have the XIB loaded OK.

But the 开发者_如何学Gotableview take up the entire screen and the nav bar is hidden.

Is there a trick to this? Do I have to manually set the size (top) in the code, and if so how exactly do I do this?


You have to create set the file as a subclass of UITableViewController and you can either set the UINavigationBar as an outlet or allocate it in the viewdidLoad method -

Watch this tutorial to understand on how to set things up.

http://www.youtube.com/watch?v=LBnPfAtswgw

0

精彩评论

暂无评论...
验证码 换一张
取 消