Try this:
let vc = ViewController() //change this to your class name
self.presentViewController(vc, animated: true, completion: nil)
With Swift3:
self.present(vc, animated: true, completion: nil)
More Related Contents:
- creating custom tableview cells in swift
- Setting device orientation in Swift iOS
- Changing the Status Bar Color for specific ViewControllers using Swift in iOS8
- Changing text color of datepicker
- JavaScript synchronous native communication to WKWebView
- How to display an activity indicator with text on iOS 8 with Swift?
- How to load URL in UIWebView in Swift?
- Get the top ViewController in iOS Swift
- Use Cocoapods with an App Extension
- Xcode: Using custom fonts inside Dynamic framework
- Swift alternative to performSelectorOnMainThread
- Changing cell background color in UICollectionView in Swift
- How do I perform an auto-segue in Xcode 6 using Swift?
- Is Swift Pass By Value or Pass By Reference
- iOS 8 UITableView separator inset 0 not working
- Error-Handling in Swift-Language
- What’s the cleanest way of applying map() to a dictionary in Swift?
- Segue and Button programmatically swift
- Swift variable decorations with “?” (question mark) and “!” (exclamation mark)
- Swift protocol with “where Self” clause
- How do I store a value of type Class in a Dictionary of type [String:Class] in Swift?
- Unexpected Non-Void Return Value In Void Function (Swift 2.0)
- Call a method from a String in Swift
- Iterate through files in a folder and its subfolders using Swift’s FileManager
- Filter non-digits from string
- How to remove the left and right Padding of a List in SwiftUI?
- How do I encode enum using NSCoder in swift?
- try, try! & try? what’s the difference, and when to use each?
- How do I access program arguments in Swift?
- How to Add Material to ModelEntity programatically in RealityKit?