I am setting the row height of my UITableView
using following code
[tableView setRowHeight: 100.00];
I am using the single line as separator in the UITableView
.
Eventhough setting the height above, height of row does not get change.
Use contentSize. height property of UITableView . I think you want to set the whole tableview with content size and then set the scrollview size related content of UITableView and for this use bellow code... After add data or reloadData in UITableView just set bellow code..
To change the height of tableView cell in ios dynamically, i.e resizing the cell according to the content available, we'll need to make use of automatic dimension property. We'll see this with the help of an sample project.
UITableView manages the basic appearance of the table, but your app provides the cells ( UITableViewCell objects) that display the actual content. The standard cell configurations display a simple combination of text and images, but you can define custom cells that display any content you want.
You should implement
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
delegate method. and return 100.0 there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With