29
28

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Swift 画面遷移のコード(初心者向け)

Last updated at Posted at 2015-07-29

色々あって初iOSアプリ制作奮闘中!

※ボタン押したタイミングなどではなくて、
数秒後に自動で画面遷移したくなったのでメモです

##1、StorybordIDを付ける
遷移したい先のビューの
StorybordIDに任意の名前を付けます。
今回の例だと"target"です

スクリーンショット 2015-07-29 17.22.31.png

##2、コードを書く


let targetViewController = self.storyboard!.instantiateViewControllerWithIdentifier( "target" ) as! UIViewController
self.presentViewController( targetViewController, animated: true, completion: nil)

以上です!
変なとこあったらご指摘ください
今日もがんばりましょう

29
28
5

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
29
28

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?