I currently have a UIViewController displaying a map view. I would like to display some custom table view cells when I tap on a button within the same UIViewController. Can I do that? Or do I need to set the table view cells within a UITableViewController?
Thanks for any advise here.
Zhen Hoe
You should use a
UIViewControllersubclass rather than a subclass ofUITableViewControllerto manage a table view if the view to be managed is composed of multiple subviews, one of which is a table view. The default behavior of theUITableViewControllerclass is to make the table view fill the screen between the navigation bar and the tab bar (if either are present).If you want to show your table view along with other views, you can add a
UITableViewsubview and make your controller implementUITableViewDelegateandUITableViewDataSourceprotocols.