Delgado Delgado - 1 year ago 74
iOS Question

Monotouch / Xamarin changing the table row height for iPad applications

I am having trouble figuring out how to change the

for the tables in my
iPad application. Previously I've worked on iPhone apps and adjusting the size of the rows were as simple as calling the following in the

public override float GetHeightForRow (UITableView tableView, NSIndexPath indexPath)
return 95f;

However, I'm finding out that this is not being called in the iPad app. Is there another method I should be calling or am I just going about this completely wrong?

Answer Source

It looks like you are doing it correctly by overriding GetHeightForRow, but if its not changing it I'd suggest checking your ViewDidLoad method on the controller to make sure it's setting the tableview source to your custom tableSource class.

For example, in ViewDidLoad:

_tableview.Source = new TableSource();
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download