Created
July 23, 2015 10:08
-
-
Save mlabraca/a218bb2a8da054b93f65 to your computer and use it in GitHub Desktop.
Automatic row height cell for iOS 8 (Swift)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override func viewDidLoad() { | |
super.viewDidLoad() | |
self.tableView.estimatedRowHeight = 80 | |
self.tableView.rowHeight = UITableViewAutomaticDimension | |
} | |
func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat { | |
return UITableViewAutomaticDimension | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment