Cellforrowatindexpath method not to perform those pits

Source: Internet
Author: User

Today, UITableView is used in the form of xib. However, the Cellforrowatindexpath method is not executed, check the number of returned row, the number of sections, data source, the agent is not a problem, but Cellforrowatindexpath still alive or dead do not do, View View TableView is still not visible. Almost to crash ....

The final discovery is that there is a constraint problem, and I set the TableView constraint to be the same height as its parent view. I guess this may be related to the TableView loading process, it detects that the height of the TableView is 0, and does not request the cell directly from the data source object.

WORKAROUND: Set the length-to-width ratio of the tableview without determining the height through the parent view.

Cellforrowatindexpath method not to perform those pits

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.