I have two parts to my project. Part one is made in the storyboard, and the second is an SKView. How can I go from my second part in the SKView back to the main UIView?
相关问题
- Unable to change UISearchBar cancel button title c
- Change a SKPhysicsBody's body shape
- UIModalTransitionStyleFlipHorizontal flips Vertica
- SKSpriteNode created from SKTexture(data:size:) is
- Begin UIPanGesture Event From A Pressed State At T
相关文章
- Why are my UIView layer properties not being set w
- How do you use SKTextureFilteringNearest with SKTe
- Can I add a border to an SKSpriteNode, similar to
- How to show the keyboard for a UIView
- UIView subclass draws background despite completel
- Rotate (angle) a UIView, using User Defined Runtim
- Subclassing SKShapeNode with Swift
- CGPointMake in Swift
Create custom
ViewController
: File - New - File - Objective-C class. Enter a name:GameSceneViewController
. Subclass ofUIViewController
.Override
viewWillAppear
method:skView
property will be anIBOutlet
forSKView
. Also make sure you've imported SpriteKit framework:Add new
ViewController
to the storyboard.In the Identity inspector enter a custom class for the added ViewController:
GameSceneViewController
Add a subview to a root view:
In the Identity inspector enter a custom class for the added View:
SKView
Create an
IBOutlet
for the addedSKView
.Now you should be able to use segues for switching between ViewControllers