Resize View For SKScene

455 views Asked by At

I'm working on an objective C SpriteKit Mac app that's targeting 10.11. I'm creating an SKScene without using an SKS since all of the items in my app are dynamically generated. The size of the window for my app is coming out as 800x600, but I want to change that. From what I've seen in the SKView class API, there's no way to resize the view. Any ideas?

Here's the code I have right now in my ViewController.m class:

#import "ViewController.h"
#import "TitleScene.h"

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    TitleScene *scene = [TitleScene sceneWithSize:CGSizeMake(1920, 1080)];

    // Set the scale mode to scale to fit the window
    scene.scaleMode = SKSceneScaleModeAspectFill;

    self.skView.showsFPS = YES;
    self.skView.showsNodeCount = YES;
    self.skView.ignoresSiblingOrder = YES;


    // Present the scene
    [self.skView presentScene:scene];
}

@end
0

There are 0 answers