Class

iOSLayout


Description

A layout that controls specific Screens depending on the type of device being used.

Properties

Name

Type

Read-Only

Shared

Content

iOSLayoutContent

Methods

Name

Parameters

Returns

Shared

Handle

Ptr

Property descriptions


iOSLayout.Content

Content As iOSLayoutContent

The content to display on the layout. This can be a single Screen, an iOSSplitView (consisting of main and a detail Screens) or an iOSTabBar (consisting of multiple Screens).

You can directly change the screen content without using MobileScreen.Show. This code creates a new MobileScreen (Screen2, added to the project) and directly assigns it to the content:

Var myNewScreen As New Screen2
App.CurrentLayout.Content = myNewScreen

Method descriptions


iOSLayout.Handle

Handle As Ptr

A pointer to the screen handle for use with Declares.

Notes

You cannot directly add controls to an iOSLayout. You add controls to Screens and Containers.

An iOSLayout allows you to specify how your app looks depending on the type of device being used. For example, on an iPhone you can have your app display a single MobileScreen that contains a Table with a list of items. To do this, in the Navigator, select the iPhoneLayout then in the Inspector, set the Content property to the MobileScreen you wish to be your default. The iPhoneLayout is already set in the App Inspector as the default screen to use for an iPhone.

On an iPad, you may instead want to have a split screen with a list of items on the left and detail information on the right. You can do this by setting the Content property for the iPadLayout to be Split and then setting the Screens for the Main and Detail sections.

Sample code

You can have multiple iOSLayouts in your project and switch them at runtime. To do so you use the MobileApplication.CurrentLayout property and change the content like this:

Var s As New MyLayout
App.CurrentLayout.Content = s.Content

Compatibility

iOS projects on the iOS operating system.

See also

Object parent class; iOSSplitView, iOSTabBar, MobileApplication and MobileScreen classes