How To Use Navigation Controller In Xamarin iOS App

Introduction

Xamarin is a platform to develop cross-platform and multi-platform apps (for example, Windows phone, Android, iOS). In Xamarin platform, the code sharing concept is used. In Xamarin Studio, Visual Studio is also available.
 

Prerequisites
  • Xamarin Studio.
  • Xcode.
The steps given below are required to be followed in order to use navigation controller, using Xamarin Studio.

Step 1

Go to Xamarin Studio.

Click New Solution—> select iOS—>select App--> Choose single View App. Afterwards, click Next.

 

Step 2

In this step, configure your app. Give the app name (Ex:sample), Organization Identifier. Afterwards, click Next.

 

Step 3

In this step, give your project name (Ex: Sample) and solution name (Ex: Sample). Give the path of your project. Afterwards, click Create.

 

Step 4

Subsequently, go to the solution. In the solution, get all the files and sources in your project. Now, select Main.storyboard and double click to open Main.storyboard page.

 

Step 5

After opening the Main.storyboard, you can design this page, as per your desire.

 

Step 6

Now, go to the toolbox Window. In the toolbox Window, get all the types of the tools and controls. You need to go to the toolbox Window. Now, scroll down and you will see all the tools and controls. You need to drag and drop the navigation controller.

 

Step 7

Now, you can delete the table View Controller.

 

Step 8

In this step, you can set the arrow mark in Navigation Controller front.default set the arrow mark in View Controller. You can move it.

 

Step 9

In this step, set the Root of your view controller. You can click the bottom of navigation controller (Ctrl+right click+ drag) move the cursor to View Controller. If it is released, the click shows the list of options. You can choose Root.

 

Step 10

Now, you need to drag and drop the View Controller.

 

Step 11

Now, you need to drag and drop the button in your first View Controller.
 
 
Step 12

In this step, navigate to second view controller. You can click the button (Ctrl +Right Click+ Move) Move the cursor to Second View Controller. If it released, the click shows the list of options and you can choose Push.

 

Step 13

Now, go to Run option, choose Debug and the list of iPhone and iPad simulators, which are available. You can choose any one simulator and run it.

 

Output

After few seconds, the app will start running on your iPhone simulator.You will see your app working successfully.

 

You can click Next View button and navigation will be working successfully.

 

Summary

This was the process of how to use navigation controller in Xamarin iOS, using Xamarin Studio.


Similar Articles