Does SpriteKit SKView have a size limit?

24 Views Asked by At

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???

0

There are 0 best solutions below