あなたはテンプレートViewController
を参照していると思います。たとえば、常に新しい単一ページのアプリケーションプロジェクトが付属しています。
あなたのアプリが起動し終わるが、何それは基本的にやっていることは次のようになると、「フードの下」に作成されています:、それはあなたがあなたを削除したい場合は、あなたがする必要があるものです実際には
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
window = UIWindow(frame: UIScreen.main.bounds)
window?.makeKeyAndVisible()
window?.rootViewController = ViewController();
return true
}
![Leave the Main Interface info blank](https://i.stack.imgur.com/DzIoF.png)
そして、あなたワットの場合を次のようにあなたのプロジェクトの一般的な情報にメインインターフェイス情報をクリアに加えて、完全にプログラム的にストーリーボードと仕事別のカスタムViewController
クラスを示すためにアリ、あなたは私が役立つことを願っ
let secondViewController = MyCustomViewController()
// this line will place the MyCustomViewController instance on top of the current ViewController
present(secondViewController, animated: true, completion: nil)
のように別のViewController
からそれを提示することができます!
コード内ですべてをやっているのですか、ストーリーボードを使用していますか? – rmaddy
@rmaddyおそらくストーリーボードです。 OPがコード内のすべてを実行していた場合、VC自身がそれを実行するためにVCがどのようにインスタンス化されているかがわかります – Alexander
これは非常に良い質問です。私は最初に私がコメントを投稿してから数秒後に発生した@Alexander Yeah、 – Alexander