Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

iOS UI Elements

What Are UI Elements?

UI elements are any visual elements you can see in our application; some respond to user actions, such as buttons and text fields, while others provide rich content, such as images and labels.


How to Add UI Elements?

UI elements can be added in code with the help of Interface Builder. If needed, we can use either of them.


Our Focus

Through code, we will focus on adding UI elements to the application. A simpler and more direct method is to use Interface Builder to drag and drop UI elements.


Method

Below we explain some UI elements by creating a simple IOS application

Step

1. As in the first IOS program, create a Viewbased application

2. Only update the ViewController.h and ViewController.m files

3. Then we add methods to the ViewController.m file to create UI elements

4. Call this method in the viewDidLoad method

5. Important lines of code have been commented in the code by marking them above the single line


List of User Interface Elements

The following explains specific UI elements and their related functions

No. Specific UI Element or Function
1 Text Fields - Text Fields
A user interface element used by an application to get user input
2 Input Types - TextFields
Users can assign keyboard input attributes by using UITextField
3 Buttons - Buttons
Used to handle user actions
4 Label - Label
Used to display static content
5 Toolbar - Toolbar
Manipulates what is displayed in the current view
6 Status Bar - Status Bar
Displays key information about the device
7 Navigation Bar - Navigation Bar
Contains a view controller that can be inferred and pops up the navigation buttons of the navigation controller
8 Tab bar - Tab bar
Generally used to switch between subtasks, views, or models within the same view.
9 Image View - Image View
Used to display a simple sequence of images
10 Scroll View - Scroll View
Used to display content over a larger screen area
11 Table View - Table View
Used to display scrollable list data in multiple rows or sections
12 IOS Split View
Used to display two panes with a master pane and control information in a detail pane
13 Text View - Text View
Used to display scrollable text information that can be selected and edited
14 View Transition - View Transition
Switching between various view displays
15 Pickers - Pickers
Used to display a list from which a specific item can be selected
16 Switches - Switches
Used to disable and enable actions
17 IOS Sliders
Used to allow the user to select a value within an allowed range
18 IOS Alerts
Used to provide important information to the user
19 IOS Icons
It is an image representing an action or depicting something related to the application