iOS Tutorial
How To Fix Error Use Of Unresolved Identifier ‘RootViewController’ In Xcode Swift Project
When i develop an iOS project in Xcode, i create a custom class RootViewController in RootViewController.swift file, this class is a sub class of UIViewController. But during the development process, when i use this custom class to create an object in another swift file ( for example SceneDelegate.swift ), i meet an error which said …
How To Fix Error Could Not Find A Storyboard Named ‘Main’ In Bundle NSBundle In Xcode 11.0
When i follow article How To Create A Swift App Without Storyboard to learn how to create an iOS app without using storyboard, after i remove the Main.storyboard file and run it. I meet error message like this Could not find a storyboard named ‘Main’ in bundle NSBundle, below is the full error messages.
How To Set Application Root View Controller Programmatically In Xcode 11
When using Xcode 11 to create a new iOS project, if you still create the root view controller in AppDelegate class’s – func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool function as usual, you will find there is a compile time error which said Value of type ‘AppDelegate’ has no member ‘window’. And …
How To Set Application Root View Controller Programmatically In Xcode 11 Read More »
What Is The Difference Between iOS UIView Frame And Bounds
UIKit.UIView class has two property frame and bounds, they all save location and size information of the UIView object, but they are different. The difference is that UIView.frame save the data relative to it’s superview’s coordinate system, and UIView.bounds save the data relative to its own coordinate system. This article will show you an example about …
What Is The Difference Between iOS UIView Frame And Bounds Read More »
UIView Life Cycle In iOS Example
After you create a Xcode project use swift single view app template, it will create a AppDelegate.swift file and a ViewController.swift file. The AppDelegate.swift file contains this iOS app’s life cycle method which will be triggered when the app’s state is changed. You can read article iOS Application Life Cycle Example to learn more. The …
How To Create A Swift App Without Storyboard
Storyboard is a very easy to use feature in iOS app development. It is visual and user friendly. But in some cases, we need to know the backend of the storyboard, we should know how the code executing logic at storyboard backend. This article will show you an example about how to create swift app …