Static UITableViewCell blank - Swift, iOS 8

余生颓废 提交于 2020-01-14 10:23:20

问题


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


回答1:


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

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




回答2:


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.



来源:https://stackoverflow.com/questions/24371954/static-uitableviewcell-blank-swift-ios-8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!