Class

iOSScreen


Warning

This item was deprecated in version 2020r2. Please use iOSLayout as a replacement.

Description

An iOS screen that controls specific layouts depending on the type of device being used.

Properties

Name

Type

Read-Only

Shared

Content

iOSScreenContent

Methods

Name

Parameters

Returns

Shared

Handle

Ptr

Property descriptions


iOSScreen.Content

Content As iOSScreenContent

The content to display on the screen. This can be a single View, a SplitView (consisting of a main and a detail view) or a TabBar (consisting of multiple Views).

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

Var myNewView As New View2
App.CurrentScreen.Content = myNewView

Method descriptions


iOSScreen.Handle

Handle As Ptr

The iOS pointer to the screen handle for use with Declares.

Notes

You cannot directly add controls to an iOSScreen. You add controls to iOSViews or iOSContainerControls.

An iOSScreen 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 View that contains a Table with a list of items. To do this, you select the View for the Content property in the Inspector for the DefaultiPhoneScreen. The iPhoneScreen is 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 DefaultiPadScreen to be Split and then setting the views for the Main and Detail sections. Refer to iOS Split Screen for more information.

Sample code

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

Var s As New MySpecialScreen
App.CurrentScreen.Content = s.Content

Compatibility

iOS projects on the iOS operating system.

See also

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