iOS 7: How to replace the standard view controller with a table view controller [closed]

StackOverflow https://stackoverflow.com/questions/21221642

  •  29-09-2022
  •  | 
  •  

Pregunta

The app is just one screen. I need the table view controller instead of the regular view controller so that I can have the table view style screen. I tried putting a table view controller on top of the view controller but when I run the simulator all I saw are blank rows.

¿Fue útil?

Solución

Don't place tableViewController on top of viewController. Instead create a tableViewController object. TableViewController is a viewController with table. Here is a simple tutorial you can get help from.

Second way add a UITableView in viewController and implement dataSource and delegate method. You can use this tutorial

Otros consejos

Hook up the TableView's datasource and delegate.

If you literally want JUST a tableview, if you're using storyboards, create a single-view app. Delete the view controller, and create a table view controller.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top