iOS development - Windows and Views -

Back to notes

iOS development - Windows and Views

Keywords: ios, mobile app development

An iOS app is displayed using windows and views.


Windows are basically containers. Their responsibility is not to directly display content, but to manage views which directly display content. If an application supports multiple screens, separate windows might be used to manage each screen. In iOS development, the UIWindow class represents a window in the code. Once a window is created, it does not change. Only the views inside the window change, as managed by the window itself.


Views draw and manage visual content, as well as providing an interface for responding to user events (such as touch events and gestures). In iOS development, the UIView class represents a view in the code, providing methods for managing visual content within the view and hooking into events. UIView is often subclassed in order to create custom views that meet specific application needs. Multiple views are often used to present content, often in a hierarchy. Therefore, it's helpful to think of views as "building blocks" for the full application. Views also support animations which can help communicate transitions to users of the application.

--> Source