[IOS_UI Controls]iphone One application development: windows, views, view controllers and Uikit basics

Source: Internet
Author: User

1, window: UIWindow

The iphone rules are a window, multiple views, Windows is the bottom of the app you see in the apps, he is fixed, basically can not ignore, but to know how each layer is the architecture.

2. View: UIView

UIView is the basis of the user-building interface, all the controls are drawn on this page, you can think of it as a canvas, you can add controls through UIView and interact with the user and pass the data.

Windows and views are the most basic classes that are used to create any type of user interface. The window represents a geometric area on the screen, and the view class uses its own functionality to draw different controls, such as the navigation bar, where the buttons are attached to the view class, and a view is linked to a window.

3. View Controller: Uiviewcontroller

View Controller Uiviewcontroller, you can treat him as if you want to use the view UIView to manage and control, you can control in this uiviewcontroller which specific uiview you want to display. In addition, the view controller adds additional features, such as built-in rotation screens, transition animations, and support for events such as touch.

4, Uikit Introduction

(1) View of the display data

Uitextview: Renders a paragraph of text to the user and allows the user to enter their own text using the keyboard.

UILabel: To implement short read-only text, you can select the color, font and font size for the label by setting the view properties.

Uiimageview: You can assign a picture to Uiimageview by uiimage loading, you can specify the location and size of the display after loading.

UIWebView: You can provide other advanced Web content such as display html.pdf. Including documents such as Xls,word.

Mkmapview: You can embed a map into your app via Mkmapview. The most popular LBS application is based on this. You can also annotate maps with Mkannotationview and Mkpinannotationview class custom annotation information.

Uiscrollview: Generally used to render something larger than the normal program window. You can scroll horizontally and vertically to see all of the content and to support the zoom feature.

(2) Make a selection view

Uialertview: Lets the user select or display text to the user through a warning view.

Uiactionsheet: Similar to Uialertview, but you can manipulate the form when you have more than one selected, which provides a menu that scrolls up from the bottom of the screen.

(3) Other

Uibuuton: The main is the button we usually touch, trigger can call the method we want to execute.

Uisegmentcontrol: The Select button allows you to set multiple selections, triggering the corresponding item to invoke a different method.

Uiswitch: Switch button, you can choose to open or close.

Uislideer: Slide button, commonly used in control volume and so on.

Uitextfield: Displays the text field and displays the text given.

UITableView: Table View, you can define the table view you want, table header and table row can be customized, a custom table such as:

Uipickerview: Selection bar, generally used for date selection.

Uisearchbar: Search bar, generally used to find the function.

Uitoolbar: Toolbars: Frames that are typically used for the main page.

Uiactivityindicatorview: progress bar, generally used to display the download progress.

Uiprogressview: progress bar, generally used to display the download progress bar.

Today, we briefly introduce some of the controls commonly used in iOS app development, and the relationship between the underlying Uiview,uiwindow and Uiviewcontrol, which is the basis that directly affects the ability to develop later, and then I'll talk about these controls separately. This is the end of the day, thank you.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.