I am making a custom table cell with InterfaceBuilder. However, when I change the height in IB, the changes are not reflected in the running program. Is there anything else I need to do besides set the height in IB?
Thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Changing the height of your custom cell in IB is not enough. The height of a row in a UITableView can be controlled in 2 ways
Set the
tableview.rowHeightproperty to the desired value if you know all cells will be the same height. You can also set this in IB if i’m not mistaken.Implement the UITableViewDelegate method
This method takes precedence, meaning that if you implement this method then the value you set in
tableView.rowHeightis ignored.