1
1

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.

UInavigationControllerクラスを作り、UIViewControllerをコードで設定する

Last updated at Posted at 2015-04-03

setViewControllersで直接ViewControllerの中身を設定しているんですが
他にスマートなやり方はあるんでしょうか?


import UIKit

class TestNavigationController : UINavigationController
{
	override func viewDidLoad() {
	let Stboard = UIStoryboard(name: "Test",bundle: NSBundle.mainBundle())
	        let TestView:UIViewController = ClientStboard.instantiateViewControllerWithIdentifier("Test") as UIViewController
	        var ClientNav = UINavigationController(rootViewController: TestView)
	        self.setViewControllers([TestView], animated: false)
	}
}
1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?