At this point in your code the view controller’s view has only been created but not added to any view hierarchy. If you want to present from that view controller as soon as possible you should do it in viewDidAppear
to be safest.
More Related Contents:
- Protocol can only be used as a generic constraint because it has Self or associatedType requirements
- What is the difference between ObservedObject and StateObject in SwiftUI
- How to segue programmatically in iOS using Swift
- A Swift example of Custom Views for Data Input (custom in-app keyboard)
- Does Swift support reflection?
- Transparent iOS navigation bar
- How to program a delay in Swift 3
- How to import own classes from your own project into a Playground
- Dynamic cell width of UICollectionView depending on label width
- Module compiled with Swift 5.1 cannot be imported by the Swift 5.1.2 compiler
- How do you make a background image scale to screen size in swift?
- How do I use subscript and superscript in Swift?
- iOS14 introducing errors with @State bindings
- How to pass data from modal view controller back when dismissed
- Detecting iOS UIDevice orientation
- UIAlertView/UIAlertController iOS 7 and iOS 8 compatibility
- Firebase with Swift 3 counting the number of children
- How to play mp3 audio from URL in iOS Swift?
- How to initialize/instantiate a custom UIView class with a XIB file in Swift
- Customize MKAnnotation Callout View?
- Increase NavigationBar height
- Confused about Orthographic Projection of camera in SceneKit
- Blocks on Swift (animateWithDuration:animations:completion:)
- iOS – ‘MyProject-Swift.h’ file not found when running Unit Tests for Swift
- How to present view controller from right to left in iOS using Swift
- Facebook Graph API GET request – Should contain “fields” parameter (Swift, Facebook SDK v4.5.1)
- How To Get HTML source from URL with Swift
- Pass multiple parameters to addTarget
- Can we add text, shape and signature in Photo Markup with Pencil Kit?
- Working with Live Photos in Playground