The UI element is any visual element that can be seen in our application, some of which respond to user actions, such as buttons, text fields, and other rich content, such as images, tags, and so on. You can add UI elements to your code with the participation of the interface generator. We can use one of them if necessary. Through the code, you will focus on adding UI elements to the application. A relatively simple and straightforward method is to use the interface builder to drag and drop UI elements. Let’s explain some UI elements by creating a simple IOS application 1、在第一款IOS程序里一样,创建一个Viewbased应用程序 2、只更新ViewController.h和ViewController.m文件 3、然后我们将方法添加到ViewController.m文件中来创建UI元素 4、在viewDidLoad方法中调用此方法 5、重要的代码行已经在代码中通过在单行上方标注的方式进行了注释 The following explains the specific UI elements and their related functions Serial number Specific UI elements or functions 1 Text Fields-文本字段 User interface elements, using the application to get user input 2 输入类型-TextFields Users can assign keyboard input attributes by using UITextField 3 Buttons-按钮 Used to handle user actions 4 Label-标签 Used to display static content 5 Toolbar-工具栏 Manipulate what is displayed in the current view 6 Status Bar-状态栏 Display key information about the device 7 Navigation Bar-导航栏 Contains a view controller that can be inferred, and pops up the navigation button of the navigation controller 8 Tab bar-选项卡栏 It is generally used to switch between subtasks, views, or models in the same view. 9 Image View-图像视图 Used to display a simple image sequence 10 Scroll View-滚动视图 Used to display more screen areas 11 Table View-列表视图 Data used to display scrollable lists in multiple rows or sections 12 IOS分割视图(Split View) Used to display control information for both panes and the main pane on the details pane 13 Text View-文本视图 Text information used to display scrolling lists can be selected and edited 14 View Transition -视图切换 Switching between various views 15 Pickers-选择器 Used to display selecting a specific data from the list 16 Switches-开关 Used as a disable and enable operation 17 IOS滑块(Sliders) Used to allow the user to select the right value within the allowed range of values 18 IOS警告对话框(Alerts) Used to provide users with important information 19 IOS图标(Icons) It is an image that represents something used to act or depict something related to an application. 9.8.1. How do I add a UI element? ¶
9.8.2. What we’re concerned about ¶
9.8.3. Method ¶
9.8.4. Steps ¶
9.8.5. List of user interface elements ¶