Screens, Windows, Views

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

Screens, Windows, Views

Figure 1-1 A window with its target screen and contentviews

There are three major objects at work here:

l A UIScreen object that identifies a physical screen connected tothe device.

l A UIWindow object that provides drawing support for the screen.

l A set of UIView objects to perform the drawing. Theseobjects are attached to the window and draw their contents when the window asksthem to.

Figure 1-2 shows how these classes (and related importantclasses) are defined in UIKit.

Figure 1-2 Classes in theview system

The characteristics of Views:

L a view represents a user interface elements, each covering a specific area. In this area, view and response action. UIView is inherited from the UIResponder.

Can a parent-child hierarchical relationship between L views. The child in the parent view display, so the parent view movement, the child will follow the movement

The L view is modular strong, and between Controller and Model on both sides of the lower coupling. When the user and view area interaction, view to send notifications to the Controller, but it does not know their response to the program is doing what the specific content.

The view controller management view

A view controller management a view, this may be the root view has a sub view.

Figure 1-3 Aview controller attached to a window automatically adds its view as a subviewof the window

self.window = [[UIWindow alloc]initWithFrame:[[UIScreen mainScreen] bounds]];

self.window.rootViewController = self.viewController;

[self.window makeKeyAndVisible];

The window size for screen

Set the root view controller to window, viewController will automatically create the UIView view. And then display. This is a principal mainly do.

Figure1-5 View controller classes in UIKit

The view controller is divided into content view controller (content viewcontrollers) and the container view controller(container viewcontrollers)

The content view controller management content display

The container view controller manages content view controller deployment

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Bartholomew at December 20, 2013 - 7:38 PM