Sprite Kit Table View

為{幸葍}努か 提交于 2019-12-22 10:07:51

问题


I'm trying to build a scrolling table of game center scores in an SKScene. Is there a way to use sprite kit and storyboards/xibs? [self addChild:customTable] on an SKScene doesn't seem to work.


回答1:


UIKit elements like UITableView, UIView, etc cannot be used as children of SpriteKit nodes. You can place a UITableView on top of a SKView/UIView but that comes out as crude. I would suggest you use a normal UIViewController to display your Game Center scores.

However, if you still need to display the scores using SpriteKit, there is a component called ScrollNode which might do the trick. You can find it here.



来源:https://stackoverflow.com/questions/22339818/sprite-kit-table-view

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