Static table view inside UIViewController [Xcode 5]

后端 未结 5 1064
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-05 02:45

I\'m aware of the problem that one is not able to have static table view content in a UIViewController in

I don\'t get a warning/error but he also doesn\'t compile. Is

5条回答
  •  猫巷女王i
    2020-12-05 03:40

    Can's solution does break in XCode 5.1 :(

    I found a workaround which builds off the same basic idea, but unfortunately requires a little more involvement: http://www.codebestowed.com/ios-static-tableview-in-uiviewcontroller/

    To summarize, you can add TableViewCells directly to views (and create IBOutlets from them, etc), but in order for them to get "moved" to the TableView properly, you need to remove them from the view in code, and you also need to set Auto-Layout constraints in IB.

提交回复
热议问题