Get .xib height to use it in the heightForRowAtIndexPath function
问题 I have created a custom .xib that contains a TableViewCell that contains a UIImageView And UILabel . I want to know TableViewCell height in the .xib file, not to set it manually in heightForRowAtIndexPath function. Also is there a property of UIImage to have the height of the TableViewCell when i change it by hand in the .xib file? 回答1: UITableViewCell is actually a UIView, so when you load it from xib the frame property can help you: cell.frame.size.height 来源: https://stackoverflow.com