简体   繁体   中英

Pros and cons of using UITableViewController vs putting UITableView inside UIViewController

I am designing an tab bar / navigation style app and I've added TableViews using both methods. Is there a preferred method and what are the pros and cons of using a UITableViewController vs putting UITableView inside UIViewController

I will need navigation item bars on top, informational labels, and navigation buttons on the bottom.

Thanks in advance.

UITableViewController can have static cells. TableView in a ViewController cannot.

Your labels will scroll with the tableview if you use a TableViewController unless you implement extra code to prevent it. With a UITableView the labels on top would stay in place automatically when scrolling.

Navigation Bar on top will always remain on top regardless.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM