How do I set the height of the preview cells in a UITableView?


When my UITableView is loading/doesn't have any cells in it yet the cells seem to be set to 44pt high. Can I customize this so it's set to a higher amount, perhaps 100pt?


You can do it in IB as well as programtically

In IB Select UITableView and in attribute inspector set the Row Height as per your need. Select UITableViewCell and in Size Inspector set height as per your need.

If you want to do it programtically, do it using heightForRowAtIndexPath and return 100.0;

By : ZAZ

You try this one:

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return 100.0f;
By : Tea

If you have no rows to display yet, set the UITableView's property .rowHeight like so:

tableView.rowHeight = 100.0f;

This video can help you solving your question :)
By: admin