In iOS, windows and views are used to applyProgramIs displayed on the screen. Windows itself does not have visible content, but it provides a basic container for the application's views. Views defines a part of content to be filled in windows. For example, you may want to use views to display images, text, shapes, or combinations of them. You can also use views to organize and manage other views.
Each application has at least one window and one view to display the content. Uikit and other system frameworks define views for displaying content. These include the simple buttons and text labels to the table view, selector view and scroll view. When these views cannot meet your needs, you can also define your own views and manage views for painting and event processing.
Preview
View manages the visual content of your application
A view is an instance of a uiview class (or its subclass). It manages a rectangular area in the window of the application. Views is responsible for painting content, processing multi-touch events, and managing the layout of sub-views. Painting uses graphics technologies such as core graphics, OpenGL ES, or uikit to draw various shapes, images, and texts in a view. A view uses gesture recognition or directly handles touch-screen events to respond to touch-screen events. At the view level, the parent View Controls the positioning and size of the Child view. This process can also be dynamically performed (during runtime processing ). This allows your view to adapt to changing conditions such as page flip and animation.
The window determines the coordinates of the view.
A window is an instance of the uiwindow class, And it processes the overall display of the user interface of the application. The window and View Controller work together to manage and interact with the entire view layer. Most of the time, the application window will not change. Once created, the window is retained as is, and only the displayed view is changed. Each application has at least one window to display the user interface of the application on the home screen of the device. If an external device is linked, the application may create a second window to display the content on the screen.
Animations provide visual feedback on interface changes to users.
Animations provide visual feedback for changes to the view hierarchy. The system defines a standard animation to show the transition between views of different groups. However, a view has many attributes that can be directly used for animation processing. For example, you can change the transparency, position, size, background color, or other attributes of a view. If you directly use the core animation object of the underlying framework of the view, you can create more animations.
Role played by interface Builder
Interface builder is a program that allows you to create and configure application windows and views graphically. Using interface builder, You can assemble your views and place them in a NIB file. It is a resource file that stores the static versions of views and other objects. When you load a NIB file at runtime, the objects in the file are re-constructedCodeControllable objects.
Interface builder greatly simplifies the construction of user interfaces. IOS also supports interface builder and nib files, so it only needs a little bit of work to merge nib files into the application design.