Sha256: d7078b99fc1a078a1fbf909d3addb0d94763d985384be3c6ef0cb0112dc981a1

Contents?: true

Size: 879 Bytes

Versions: 5

Compression:

Stored size: 879 Bytes

Contents

class ViewController < UIViewController

  def loadView
    bounds = UIScreen.mainScreen.bounds
    self.view = SKView.alloc.initWithFrame(bounds)
  end

  def viewDidLoad
    super

    # Configure the view.
    sk_view = self.view
    sk_view.showsFPS = true
    sk_view.showsNodeCount = true

    # Create and configure the scene.
    scene = MyScene.sceneWithSize(sk_view.bounds.size)
    scene.scaleMode = SKSceneScaleModeAspectFill

    # Present the scene.
    sk_view.presentScene(scene)
  end

  def shouldAutorotate
    true
  end

  def supportedInterfaceOrientations
    if UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPhone
      UIInterfaceOrientationMaskAllButUpsideDown
    else
      UIInterfaceOrientationMaskAll
    end
  end

  def didReceiveMemoryWarning
    super
    # Release any cached data, images, etc that aren't in use.
  end
end

Version data entries

5 entries across 4 versions & 1 rubygems

Version Path
motion-template-spritekit-0.4.0 template/spritekit-ios/files/app/view_controller.rb
motion-template-spritekit-0.4.0 template/spritekit-tvos/files/app/view_controller.rb
motion-template-spritekit-0.3.0 template/spritekit-ios/files/app/view_controller.rb
motion-template-spritekit-0.2.0 template/spritekit-ios/files/app/view_controller.rb
motion-template-spritekit-0.1 template/spritekit-ios/files/app/view_controller.rb