IOS TOPICS

IOS Introduction
Swift UI Label
Swift UI Button
Swift UI Text Field
Swift UI Slider
Swift UI Switch
Swift UI Stepper
Swift UI Date Picker
Swift UI Segmented Control
Views
Table View
Collection Views
SCROLL VIEW
iOS Content View
iOS View Controllers
iOS Bar interface
iOS Navigation interface
iOS Architect Pattern
iOS Libraries
iOS Web request and parsing
iOS user defaults
iOS Coredata and database

Picker View


Picker View

The picker is a view that displays one or more sets of values, similar to a slot machine. Users pick values by spinning the wheels until a selection indication coincides with the appropriate row of data. Components and rows make up the user interface given by a picker view.

A picker view is a view that displays one or more sets of values on a spinning wheel or slot machine so that the user may spin the wheel to select one. It is a member of the UIPickerView class, which is derived from

UIView. class UIPickerView : UIView

As the name implies, the picker view allows the user to select an item from a list of many options. PickerView can show one or more sets, each referred to as a component. The selectable elements are represented by a sequence of indexed rows in each component. By turning the wheels, the user may pick the objects.

Adding PickerView to iOS application

  • In the object library, look for the UIPickerView and drag it to the storyboard.
  • Define the pickerview's auto-layout rules to control its location and size on different screen devices.
  • To control the data and look of PickerView, use the UIPickerViewDelegate and UIPickerViewDataSource protocols.