雪碧套件表视图 [英] Sprite Kit Table View

查看:58
本文介绍了雪碧套件表视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 SKScene 中构建游戏中心分数的滚动表.有没有办法使用精灵套件和故事板/xibs?[self addChild:customTable] 在 SKScene 上似乎不起作用.

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.

推荐答案

UITableViewUIView 等 UIKit 元素不能用作 SpriteKit 节点的子节点.您可以将 UITableView 放在 SKView/UIView 之上,但结果很粗糙.我建议您使用普通的 UIViewController 来显示您的 Game Center 分数.

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.

但是,如果您仍然需要使用 SpriteKit 显示分数,则有一个名为 ScrollNode 的组件可能会起作用.您可以在此处找到它.

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.

这篇关于雪碧套件表视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆