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)
}
Also in Swift:
- swift set constraint programmatically
- receive notificationcenter data in swift
- swift view float on keyboard show
- upload a single image alamofire 5.0 swift
- variadic parameters swift
- How do I check if a string contains another string in Swift
- how to clear text file swift
- change the title of a button using Swift
- swift allow gesture recognizer over others
- swift for loop index
- swift loop through array
- swift add horizontal line uiview programmatically
- reverse list swift
- declare function in swift
- swift file size from url
- swiftui foreach
- connect old iphone with latest xcode 12 or 13
- swift initialize a view
- ShareSheet: UIViewControllerRepresentable swiftui
- how to set return type swift
- swift completion handler
- Library not loaded: @rpath/App.framework/App
- swift get current time
- uitableviewcell automatic height