我需要一种方法来显示排行榜 - 最佳用户分数(本地用户,本地分数).
我是否需要为这种事情创建我自己的"自己的"节点,或者更好地在透明背景上使用SKView上面的UITableView?
为什么我看不到SKScene中的文字?这是在SKScene中使用UIScrollView的正确方法吗?
-(id)initWithSize:(CGSize)size {
if (self = [super initWithSize:size]) {
UIScrollView * contentScrollView = [[UIScrollView alloc]initWithFrame:self.view.frame];
contentScrollView.backgroundColor = [UIColor whiteColor];
[contentScrollView setUserInteractionEnabled:YES];
UITextView * mainContent = [[UITextView alloc]initWithFrame:self.view.frame];
mainContent.text = @"HELLO WORLD";
mainContent.textColor = [UIColor blackColor];
[contentScrollView addSubview:mainContent];
[self.view addSubview:contentScrollView];
}
return self;
}
Run Code Online (Sandbox Code Playgroud)