読者です 読者をやめる 読者になる 読者になる

PGメモ

非エンジニアの記録

swiftでのコードのみで画面遷移

navigation controller使わずに遷移

let nextView = UIStoryboard(name: "Main", bundle: nil).instantiateViewControllerWithIdentifier("Detail") as UIViewController
self.presentViewController(nextView, animated: false, completion: nil)

navigation controller使ってに遷移

let storyboard = UIStoryboard(name: "Main", bundle:nil)
let pageViewController = storyboard.instantiateViewControllerWithIdentifier("Detail") as! DetailViewController
self.navigationController?.pushViewController(pageViewController, animated: true)