Fun with Table Views
Table Views
can be a bit overwelming when first using them. There is a lot of inherited methods from UITableViewController
, UITableViewDelegate
, and UITableViewDataSource
. I think the best way to think of table views is the same way as any other custom control. Basically, you are dynamically generating the table, rows, cells and defining a view(s) that go in each cell. So, all the crazy amount of methods made available are there to help with generating those fields which explains why there are so many.
The screenshot shows data that I created by initializing three meal
objects using static, hard-coded property values.
Eventually, I will move away from the hard-coded property values and hook into a database initialize my Meal
object that way.