Skip to content

iOS View Navigation Tips

Your iOS apps uses Views to display information to the user and often your app will have multiple views to show different information. These views can be displayed in different ways.


The most common way to display new views is to use the PushTo method.

With this method, the new view appears on top of the current view and a “back” button is displayed in the Navigation Bar (if it is enabled) to close this new view so that the original view is displayed.

Download the PushTo example to see how this works.

Refer to Views in the User Guide to learn more about PushTo.

Modal View

A modal view is a view that appears over a view, and is a bit more limited. The user cannot display a new view or go back to the original view until the modal view is closed. To display a modal view in your Xojo iOS apps, you have to use a Declare.

Download the ModalView example to see how it works.

Refer to Views in the User Guide to learn more about Modal View.

Change Current Screen

There are times where you may want to reset the view hierarchy so that the “back” feature is not available. An example of this might be an initial login screen displayed by your app. After the user logs in, you will likely want your true main view to replace the login view, but not allow the use of the “back” feature to go back to the login view.

A feature (iOSApplication.CurrentScreen) added to Xojo in 2016r1 allows you to do that by changing the current screen of the app to point to your new view.

Download the Navigation example to see how it works.

Refer to Views in the User Guide to learn more about this.

Splits on iPad

An iPad can be set up with a split view that allows two views to be displayed on the screen at the same time. The view on the left is the “master” and the view on the right is the “detail”. If you’ve used Mail on iOS then you’re familiar with this type of layout.

When you have a split view set up, you can access the base view for the master and detail areas by using the ParentSplitView property of any of the views. ParentSplitVIew is an iOSSplitView with its own properties (Master and Detail) that give you access to the content of the split area.

Download the SplitVIew example to see how it works.

These tips should help you provide great navigation for your iOS apps. If you have an iOS app in the App Store, be sure to tell everyone in the Xojo-made iOS apps in the App Store conversation of the forum and tweet us the link @xojo!

We’ve got lots of resources to get your iOS app started, check them out or click below to learn about building 64bit iOS apps for the App Store.

Xojo iOS 64bit