简体   繁体   中英

Static UITableViewCell blank - Swift, iOS 8

I am trying to implement some static cells in a UITableView using Xcode 6 beta 2 and Swift. I have successfully implemented dynamic cells.

When the user clicks on one of the dynamic cells there is a push segue to a new UITableViewController for a UITableView with static cells.

I have set this all up in Xcode and the segue works but when I drag a UILabel onto one of the static cells it just doesn't show up at run time. A few things that might help narrow down whats going on:

  1. The data source methods are not being implemented in the UITableViewController
  2. If I set the background of one of the static cells to a particular color, that shows up at run time

Any advice much appreciated.

Thanks in advance

I "fixed" the issue creating a new storyboard...

On a clean project it was working, maybe it's a bug?

I believe this is the answer here:

https://stackoverflow.com/a/24708004/3827274

TLDR: it's an Xcode bug with changing the view to 'compact' width which seems to only affect alignment/positioning. Click on your UILabel inside the cell and go to the inspector all the way to the bottom and play with the 'Installed' or note if the default one is disabled.

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