私はこの本を学ぼうとしていますが、すべての例はストーリーボードなしであり、アプリケーションを構築しようとしたときに次のエラーが発生しました:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Application windows are expected to have a root view controller at the end of application launch'
私はこれでそれを修正しようとしました:
ViewController *myView = [[ViewController alloc] init];
[self.window addSubview:myView];
self.window.rootViewController = myView;
しかし、その後、別のエラーを受け取りました:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[HypnoView _preferredInterfaceOrientationGivenCurrentOrientation:]: unrecognized selector sent to instance 0x78f68730'
誰かが私になぜそれが起こっているのか説明できますか?