为什么在 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;
}