Reputation: 49
I have build UItableView
with static cells
, when I tried to run it nothing is appear in my simulator,
here is my interface builder looks like:
and here in simulator:
Upvotes: 1
Views: 492
Reputation: 1723
You need to provide return value for number of sections and number of rows. By default it is 0
override func numberOfSectionsInTableView(tableView: UITableView) -> Int {
// Return the number of sections.
return 1
}
override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
// Return the number of rows in the section.
return 3
}
Upvotes: 1
Reputation: 806
Make sure the tableview doesn't have a programatic datasource connected to your view controller, with the numberOfCells/numberOfSections/cellForRow methods overriding the static cell population
Upvotes: 0