In this recipe, we will learn how to use the UIPageControl
class to provide page navigation.
The UIPageControl
provides a simple visual representation of multiple pages or screens in an iOS app, which is indicated by dots. The following screenshot shows an example of the page control indicating that content is divided into three pages:
The dot that corresponds to the current page is highlighted. It is usually combined with UIScrollView
. Create a new iPhone Single View Application project in Xamarin Studio and name it PageNavApp
. Add three image files in the project and set their Build Action to BundleResource.
The following are the steps to create this project:
Open the
PageNavAppViewController.xib
file in Interface Builder.Add
UIPageControl
to the bottom of the view andUIScrollView
above it. Resize the scroll view to take up all the remaining space of the view and save the document.Back in Xamarin Studio, enter the...