I've been facing the problem since i decided to support IOS7, i was using heightForRowAtIndexPath to return UITableViewAutomaticDimension which is working well only with IOS8. and since UITableViewAutomaticDimensiondoesn't work with IOS7 so i have to handle it manually. but there is no such resource to help in swift about this issue.
i am using custom cell called "Card Cell" :
class CardCell: UITableViewCell {
@IBOutlet var mainView: UIView!
@IBOutlet weak var text1: UILabel!
@IBOutlet weak var sharefb: UIButton!
}
so if there is anyway to handle it in heightForRowAtIndexPath manually using swift ?
In iOS 7 you need to implement UITableViewDelegate protocol method and return your cell height.
func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
return 100.0;
}
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