tags:

views:

485

answers:

1

Like I understand, an Window has a lot of Views. A View is an object that can draw something on the screen, and the Window provides the space for drawing. So where's the point, that I dont have an window? What's the difference here between them?

+3  A: 

On the iPhone, a window really is just a special kind of view. If you look at the docs for the UIWindow class, you'll see that it has additonal methods above and beyond what a regular UIView has. However, most of those methods seem to have analogous UIView counterparts.

The one thing I've found windows useful for is that UIViews have a "window" property that can be used to instantly access the window. If you have many nested views and need to immediately get to the top level from a 3rd or 4th level deep view, that window property can come in handy.

Eric Petroelje