简体   繁体   中英

UITableView Cells not showing properly

I've made a table view, and I have a prototype cell that has a height of 100, which I set in the IB. However the cell displays as the original cell height that the prototype cell is set to by default. It should be noted that the table view is nested in a UIContainerView, not sure if that's important, but thought it could have to do with something.

Storyboard (in Xcode) 在此处输入图片说明

Simulator在此处输入图片说明

You need to set height for row

func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
    return 100.0;//Choose your custom row height
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM