These are my delegate methods for tablerow
func numberOfSectionsInTableView(tableView: UITableView) -> Int {
return 1
}
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 2
}
func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat
{
println(indexPath.row)
return 300.0;
}
The println in heightForRowAtIndexPath is acting wierd, this is my output:
0
1
0
1
0
1
0
1
0
0
1
1
Why is it called so many times? only 2 cells are being shown in my UI.