Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the purpose of UIWindow?

I've always seen references to an app's 'window', and I see that AppDelegates usually have a UIWindow property called 'window'. So I'm just wondering how to perceive this UIWindow object. I see that it's a subclass of UIView, so I guess technically it's a View right? So would it be safe to say it's like the Superview of an entire app? Also, when and why might I ever refer to it? What value does it add?

I know there are a lot of questions in there but just some overall context on UIWindow would be nice.

like image 619
hgwhittle Avatar asked Aug 16 '13 21:08

hgwhittle


2 Answers

You might want to check out the About Windows and Views section in the View Programming Guide for iOS.

In iOS, you use windows and views to present your application’s content on the screen. Windows do not have any visible content themselves but provide a basic container for your application’s views. Views define a portion of a window that you want to fill with some content. For example, you might have views that display images, text, shapes, or some combination thereof. You can also use views to organize and manage other views.

Also note that an iOS application usually only has one window. An exception would be, if an app displays content on an external screen.

like image 154
Kevin Avatar answered Oct 05 '22 23:10

Kevin


UIWindow
The presentation of one or more views on a screen is coordinated by UIWindow object. In iOS application usually only has one window. while View multiple. Windows and Views both are used for present your application’s content on the screen. Windows provide a basic container for your application’s views but not have any visible content. The view is a portion of a window where you can fill with some content.For example, you might have views that display images, text.

ProblemStucks

like image 41
Parth Avatar answered Oct 05 '22 23:10

Parth