简体   繁体   中英

iOS: Items in custom UITableViewCell not showing up consistently. Storyboard bug?

I have encountered one peculiar situation where items I included (UILabels, UIButtons, etc) in my UITableViewCell does not show up in a consistent way, ie: If I try add-in new items, they do not show up although I've made sure that proper connections have been made.

I even tried deleting the prototype cell and re-do the prototype cell from scratch. Now, it's even more weird, nothing is showing up when I run the app in both my simulator and device.

A few possibilities I think could have contributed to the problem:

  1. There's a bug in xCode 6.1 and xCode 6.1.1
  2. There's a bug in Storyboard
  3. The items's frame (x,y,height,width) are somehow screwed up during runtime. I use autolayout.
  4. The storyboard or my project's config stuff are messed up somehow.

I have totally no idea on how to fix it. Any wise hard-core coder out there able to help? My source code folder is here for your reference: http://dropbox.com/sh/v1prxriqd7pcsws/AABbjYCPwlTMfzgY4Y2xh-PJa?dl=0

*Note: The TableViewController involved is "NewsFeedPageTableViewController", Cell class involved is "NewsFeedCell", and in the file, the specific problem you may find is the coverImage item which is currently not showing when the app runs. Try add in new items, and be surprised that they won't show up either. Try re-do the cell and be surprised still!

Need Help!

The UIImageView in the cell is uninstalled fro size class Any Any , but is installed for size class reg reg - so it will only appear on iPad devices.

The image view is also missing constraints, so there are layout errors. When I installed it for Any Any and added constraints it appeared

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