From the course: iOS Development: Architecture

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Subclassing UI application

Subclassing UI application

From the course: iOS Development: Architecture

Start my 1-month free trial

Subclassing UI application

- [Karoly] First, let's comment out the UI application main attribute from the AppDelegate. I'm going to stop the app now. To save us some time I've gone ahead, and created the main Swift file with the UI application main function. I'm going to add it to the project now. The first two parameters are filled in already. We should focus on the principalClassName parameter. This is where we can provide the name of our custom UI application subclass. Using NSString from class I create the string representation of the custom application class's name. The last parameter is the AppDelegate class. Now the actual instantiate, and use a custom application object. Let's try it out. If we tap or swipe the user interface the console shows all the intercepted user events.

Contents