tags:

views:

47

answers:

2

Hi All,

Just want to know how many windows does an iPhone application typically have?

Thanks Saurabh

+2  A: 

One, typically.

Though it depends on your app and what you need to do that may involve windows. However, the iPhone only supports displaying one window at a time.

Jasarien
As I point out in my answer, with external display support you now may need to create a second UIWindow instance to handle the content shown on the external display.
Brad Larson
Yes good point. I completely forgot about external display support. I upvoted your answer.
Jasarien
+1  A: 

iOS uses one UIWindow instance for each visible screen. In most cases, this means one UIWindow for the screen on the device.

However, with the support for external displays that was added in iPhone OS 3.2, you now may need to have one UIWindow for each display you are providing content for. Each UIWindow would then be attached to a different UIScreen instance. For example, an iPad connected to an external monitor would have a UIWindow for its main touchscreen display and a different UIWindow for the connected monitor. Each could be displaying different content (like how Keynote can have presenter notes on the touchscreen and the presentation itself on the external display).

Brad Larson