我遇到问题,当我为SKView设置的宽度大于屏幕宽度时,我的skview消失了。
如果我这样设置SKView,则可见:
SKView *skview = [[SKView alloc] initWithFrame:CGRectMake(0, 100, self.view.frame.size.width, 100)];
skview.backgroundColor = [UIColor blackColor];
[self.view addSubview:skview];
但是如果我给SKView更大的宽度,它就消失了:
SKView *skview = [[SKView alloc] initWithFrame:CGRectMake(0, 100, self.view.frame.size.width*2, 100)];
skview.backgroundColor = [UIColor blackColor];
[self.view addSubview:skview];
有人知道为什么吗?