Accessing contacts

To begin our exploration of what Xamarin.Mobile offers, let's access the address book within a Xamarin application. For iOS, the first step is to make a Single View Application project by navigating to iOS | iPhone Storyboard. Make sure you add Xamarin.Mobile to the project from the Component Store.

Now, let's implement a simple UITableView with a list of contacts:

  1. Open the MainStoryboard.storyboard file. Delete any existing controllers created by the project template.
  2. Create UINavigationController with a UITableViewController as its root child controller.
  3. Set the Class of UITableViewController to ContactsController by navigating to Properties | Widget in the iOS designer.
  4. Save the storyboard file and return to Xamarin Studio.

Open ...

Get Xamarin: Cross-Platform Mobile Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.