1

I had a problem,When I set up a larger width than screen for SKView, my skview just disappear.

If I setup SKView like this, it's visible:

SKView *skview = [[SKView alloc] initWithFrame:CGRectMake(0, 100, self.view.frame.size.width, 100)];
skview.backgroundColor = [UIColor blackColor];
[self.view addSubview:skview];

BUT if I give SKView a larger width, it's gone:

SKView *skview = [[SKView alloc] initWithFrame:CGRectMake(0, 100, self.view.frame.size.width*2, 100)];
skview.backgroundColor = [UIColor blackColor];
[self.view addSubview:skview];

Anyone knows why???

Alison wu
  • 11
  • 1
  • Found a same question: https://stackoverflow.com/questions/52108374/spritekit-why-does-skview-disappear-at-one-height-but-appears-at-another-height?rq=1 – Alison wu Mar 22 '19 at 06:23

0 Answers0