iOS Development with Xamarin Cookbook
上QQ阅读APP看书,第一时间看更新

Introduction

An application's User Interface (UI) is essential for providing the user with an easy way of communicating with a device, be it a computer, a mobile phone, or a tablet. On a mobile device, the user interface is not only essential but the only way to interact with the user. Developers have to cope with various limitations and restrictions when developing applications for mobile devices. The processing power of mobile devices does not match that of desktop CPUs, and the screens are smaller, making the process of choosing what sort of information will be displayed each time somewhat more difficult.

In this chapter, we will discuss the key components of an iOS application's UI. We will see how to use and customize these components to create rich application user interfaces and discuss the similarities and differences they have with their desktop equivalents. The following is a list of these components:

  • UIView: This is a customizable container that is the base object of most iOS user interface controls
  • UIButton: This is the equivalent of a Button in the .NET world
  • UILabel: This is the equivalent of a Label in the .NET world
  • UIImageView: This is a view that allows us to display and create basic animations with images
  • UITextView: This is a view that allows us to display editable text
  • UITextField: This is similar to .NET's TextBox control
  • UIProgressView: This displays the known length progress
  • UIScrollView: This provides the ability to display scrollable content
  • UIPageControl: This provides navigation functionality to the content that is divided into different pages or screens
  • UIAlertView: This is the default iOS control for displaying a message box to the user

We will also talk about how to programmatically create instances of these components and how to style and use them efficiently.