SwiftUI provides views, controls, and layout structures for declaring the app’s user interface. Declare the user interface and behavior for app on every platform. This framework provides event handlers for delivering taps, gestures, and other types of input. Tools to manage the flow of data from app’s models down to the views and controls that users interact.

Create the own custom views and compose them with SwiftUI views for displaying text, images, and custom shapes using stacks, lists.

Customize accessibility support in SwiftUI, and localize app’s interface for different languages and currencies.

UI Image

To use a UIImagePickerController in Swift class need to make ViewController conform to a couple of delegates:

  • UIImagePickerControllerDelegate
  • UINavigationControllerDelegate

Creating UIImagePickerController

  • Creates a new UIImagePickerController,
  • Sets the sourceType to UIImagePickerControllerSourceType.photoLibrary
  • which means that users will need to pick their photo from a photo library on their phone rather than by taking a new picture.
  • To make UIImagePickerController work with a Camera instead, set UIImagePickerControllerSourceType.camera as a sourceType.
  • And presents the UIImagePickerController to a user