Storyboard can't find SKView in Xcode9?

I have a regular .sks file in Xcode9, TestScene.sks.

Of course, you need SKView to hold .sks.

If I manually create SKView in the code in the usual way, it works fine. (I have included a handy example of this at the bottom of this post.)

However, in X9, you can simply add SKView to the storyboard .

And then just select the .sks file in the attribute check ....

enter image description here

But.

This does not work. I just get this error:

Main.storyboard: Class Unavailable Xcode.IDEInterfaceBuilder.CocoaTouch.SKView

What is the problem?

SpriteKit.framework is included in Link Binary ...

What could be the reason?


Point 1: to record how to manually add the code:

func manuallyAddSceneInCode() {

    let sk: SKView = SKView()
    sk.frame = view.bounds
    sk.backgroundColor = .clear
    view.addSubview(sk)

    let scene = SKScene(fileNamed: "TestScene")!
    scene.scaleMode = .aspectFit
    scene.backgroundColor = .clear

    sk.presentScene(scene)
}

2 - . " UIView SKView", , , " " . ( , , UIView UILabel - UILabel .)


3 - , , , , , , - "Xcode.IDEInterfaceBuilder....", ?


4, 9.0.1, ​​ .

+6
2

. , , . iOS 9.0, , iOS 10, . , .

EDIT:

, :

https://github.com/seriouscyrus/SCSpriteKitStoryboard

- 9.0, , iOS10Deployment . .

, : "SKView iOS 10.0 (NSCoding ".

+1

, Spritekit , ? GLKit, .

( , obj-c)

0

All Articles