How to set view of programatically created view controller to SKView?
问题 I am developing a game and would like to have one sprite-kit scene have its own view controller (a conclusion I've reached after much debate), and would like to avoid using storyboard (I can accomplish what I want with storyboard, but would like to learn how to do it without storyboard). In my main view controller, after clicking a button, I have the following code MyViewController2 *test = [[MyViewController2 alloc] init]; test.view = [[SKView alloc] init]; [self presentViewController: test