swift push view controller
let vc = UIStoryboard.init(name: "Main", bundle: Bundle.main).instantiateViewController(withIdentifier: "IKDetailVC") as? IKDetailVC
self.navigationController?.pushViewController(vc!, animated: true)
swift push view controller
let vc = UIStoryboard.init(name: "Main", bundle: Bundle.main).instantiateViewController(withIdentifier: "IKDetailVC") as? IKDetailVC
self.navigationController?.pushViewController(vc!, animated: true)
navigationcontroller.pushviewcontroller
//Appdelegate.swift
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
self.window = UIWindow(frame: UIScreen.mainScreen().bounds)
let navigat = UINavigationController()
let vcw = ViewController(nibName: "ViewController", bundle: nil)
// Push the vcw to the navigat
navigat.pushViewController(vcw, animated: false)
// Set the window’s root view controller
self.window!.rootViewController = navigat
// Present the window
self.window!.makeKeyAndVisible()
return true
}
//ViewController.swift
@IBAction func GoToNext(sender : AnyObject)
{
let ViewController2 = ViewController2(nibName: "ViewController2", bundle: nil)
self.navigationController.pushViewController(ViewController2, animated: true)
}
swift push view controller programmatically
let storyBoard : UIStoryboard = UIStoryboard(name: "Main", bundle:nil)
let nextViewController = storyBoard.instantiateViewController(withIdentifier: "nextView") as! NextViewController
self.present(nextViewController, animated:true, completion:nil)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us