Its simple, just add this to your code:
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return UITableViewAutomaticDimension;
}
It automatically count an height of row and than return a float… 🙂
Hope this helps!
More Related Contents:
- How to customize the background/border colors of a grouped table view cell?
- UITableview: How to Disable Selection for Some Rows but Not Others
- Pull to refresh UITableView without UITableViewController
- Use didSelectRowAtIndexPath or prepareForSegue method for UITableView?
- UITableView and UIView with keyboardWillShow
- How to set the full width of separator in UITableView
- Design UITableView’s section header in Interface Builder
- Determine device (iPhone, iPod Touch) with iOS
- Proper way to exit iPhone application?
- How do I make an HTTP request in Swift?
- iPhone/iOS JSON parsing tutorial [closed]
- iPad keyboard will not dismiss if modal ViewController presentation style is UIModalPresentationFormSheet
- Hide separator line on one UITableViewCell
- How do I make UILabel display outlined text?
- Detecting Color of iPhone/iPad/iPod touch?
- UITableView Cell selected Color?
- Detect current device with UI_USER_INTERFACE_IDIOM() in Swift
- How to remove empty cells in UITableView? [duplicate]
- ViewDidAppear is not called when opening app from background
- UITableView row animation duration and completion callback
- iOS memory allocation – how much memory can be used in an application? [duplicate]
- How to check if UILabel is truncated?
- App not sized properly iOS 8 iPhone simulator
- How to set device (UI) orientation programmatically?
- Stop UIWebView from “bouncing” vertically?
- How to integrate Facebook without redirect Safari browser in iOS app with latest FBSDK
- UITableView Mix of Static and Dynamic Cells?
- Why does my programmatically created screenshot look so bad on iOS 7?
- Play video on UITableViewCell when it is completely visible
- Dynamically getting height of UILabel according to Text return different Value for iOS 7.0 and iOS 6.1