LoginSignup
2
2

More than 5 years have passed since last update.

アニメーションなしに別のViewControllerに遷移する

Last updated at Posted at 2017-01-31

ボタンを押すとすぐに遷移します。

before after
螢幕快照 2017-01-31 12.13.45.png 螢幕快照 2017-01-31 12.13.47.png
Swift
let storyboard = UIStoryboard(name: "Second", bundle: nil)
let secondViewController = storyboard.instantiateInitialViewController() as! SecondViewController
self.present(secondViewController, animated: false, completion: nil)

コード例 (Xcode 8, Swift 3.0)

2
2
0

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
2
2