Book Image

iOS Development with Xamarin Cookbook

By : Dimitrios Tavlikos (USD)
Book Image

iOS Development with Xamarin Cookbook

By: Dimitrios Tavlikos (USD)

Overview of this book

Table of Contents (22 chapters)
iOS Development with Xamarin Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Navigating through the content divided into pages


In this recipe, we will learn how to use the UIPageControl class to provide page navigation.

Getting ready

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.

How to do it...

The following are the steps to create this project:

  1. Open the PageNavAppViewController.xib file in Interface Builder.

  2. Add UIPageControl to the bottom of the view and UIScrollView above it. Resize the scroll view to take up all the remaining space of the view and save the document.

  3. Back in Xamarin Studio, enter the...