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:
- Open the
MainStoryboard.storyboard
file. Delete any existing controllers created by the project template. - Create
UINavigationController
with aUITableViewController
as its root child controller. - Set the Class of
UITableViewController
toContactsController
by navigating to Properties | Widget in the iOS designer. - 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.