The difference between UIWindow and UIView

After creating an empty xib file, it seems that we can either drag the UIWindow or the UIView to cover the entire screen. My question is, what are the practical differences between them and in what circumstances should we use one over the other?

+7
source share
2 answers

There is no visible content on Windows, but as the main container for the representations of your applications. Views define the part of the window that you want to fill with some content. Typically, an iOS application has only one window.

About Windows and Views

+19
source

It is not the same or the same. Your application must have an instance of UIWindow, which is a container for the UIView instances that you represent.

An application can either load an instance of UIWindow from a nib file, or create it programmatically. Check out the sample code to see how this is done.

+8
source

All Articles