Class

# MobileScreen

<div class="rst-class">

forsearch

</div>

Popover

<div class="rst-class">

forsearch

</div>

Screen

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

A screen is a layout of mobile controls.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                                                          | Type                                                          | Read-Only | Shared |
|---------------------------------------------------------------|---------------------------------------------------------------|-----------|--------|
| `BackButtonCaption<mobilescreen.backbuttoncaption>`           | `String</api/data_types/string>`                              |           |        |
| `BackgroundColor<mobilescreen.backgroundcolor>`               | `ColorGroup</api/graphics/colorgroup>`                        |           |        |
| `BottomLayoutGuide<mobilescreen.bottomlayoutguide>`           | `Object</api/data_types/additional_types/object>`             | ✓         |        |
| `ControlCount<mobilescreen.controlcount>`                     | `Integer</api/data_types/integer>`                            | ✓         |        |
| `HasBackButton<mobilescreen.hasbackbutton>`                   | `Boolean</api/data_types/boolean>`                            |           |        |
| `HasNavigationBar<mobilescreen.hasnavigationbar>`             | `Boolean</api/data_types/boolean>`                            |           |        |
| `LargeTitleDisplayMode<mobilescreen.largetitledisplaymode>`   | `LargeTitleDisplayModes<mobilescreen.largetitledisplaymodes>` |           |        |
| `LastControlIndex<mobilescreen.lastcontrolindex>`             | `Integer</api/data_types/integer>`                            |           |        |
| `LeftNavigationToolbar<mobilescreen.leftnavigationtoolbar>`   | `MobileToolbar</api/user_interface/mobile/mobiletoolbar>`     |           |        |
| `MinimizeTabBar<mobilescreen.minimizetabbar>`                 | `Boolean</api/data_types/boolean>`                            |           |        |
| `Modal<mobilescreen.modal>`                                   | `Boolean</api/data_types/boolean>`                            |           |        |
| `NavigationBarColor<mobilescreen.navigationbarcolor>`         | `ColorGroup</api/graphics/colorgroup>`                        |           |        |
| `NavigationBarHeight<mobilescreen.navigationbarheight>`       | `Integer</api/data_types/integer>`                            |           |        |
| `NavigationBarTextColor<mobilescreen.navigationbartextcolor>` | `ColorGroup</api/graphics/colorgroup>`                        |           |        |
| `NavigationToolbar<mobilescreen.navigationtoolbar>`           | `MobileToolbar</api/user_interface/mobile/mobiletoolbar>`     |           |        |
| `ParentSplitScreen<mobilescreen.parentsplitscreen>`           | `iOSSplitView</api/ios/iossplitview>`                         | ✓         |        |
| `ParentTabBar<mobilescreen.parenttabbar>`                     | `iOSTabBar</api/ios/iostabbar>`                               | ✓         |        |
| `RightNavigationToolbar<mobilescreen.rightnavigationtoolbar>` | `MobileToolbar</api/user_interface/mobile/mobiletoolbar>`     |           |        |
| `ScaleFactor<mobilescreen.scalefactor>`                       | `Double</api/data_types/double>`                              | ✓         |        |
| `TabBarVisible<mobilescreen.tabbarvisible>`                   | `Boolean</api/data_types/boolean>`                            |           |        |
| `TabIcon<mobilescreen.tabicon>`                               | `Picture</api/graphics/picture>`                              |           |        |
| `TintColor<mobilescreen.tintcolor>`                           | `ColorGroup</api/graphics/colorgroup>`                        |           |        |
| `Title<mobilescreen.title>`                                   | `String</api/data_types/string>`                              |           |        |
| `Toolbar<mobilescreen.toolbar>`                               | `MobileToolbar</api/user_interface/mobile/mobiletoolbar>`     |           |        |
| `TopLayoutGuide<mobilescreen.toplayoutguide>`                 | `Object</api/data_types/additional_types/object>`             | ✓         |        |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                                      | Parameters                                                                                                                                                                                                                                                                 | Returns                                                       | Shared |
|-----------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------|--------|
| `AddConstraint<mobilescreen.addconstraint>`               | constraint As `iOSLayoutConstraint</api/ios/ioslayoutconstraint>`, name As `String</api/data_types/string>` = ""                                                                                                                                                           |                                                               |        |
| `AddControl<mobilescreen.addcontrol>`                     | child As `MobileControl</api/user_interface/mobile/mobilecontrol>`                                                                                                                                                                                                         |                                                               |        |
| `Close<mobilescreen.close>`                               |                                                                                                                                                                                                                                                                            |                                                               |        |
| `Constraint<mobilescreen.constraint>`                     | name As `String</api/data_types/string>`                                                                                                                                                                                                                                   | `iOSLayoutConstraint</api/ios/ioslayoutconstraint>`           |        |
| `ContentSize<mobilescreen.contentsize>`                   |                                                                                                                                                                                                                                                                            | `Size</api/graphics/size>`                                    |        |
| `ControlAt<mobilescreen.controlat>`                       | index As `Integer</api/data_types/integer>`                                                                                                                                                                                                                                | `MobileUIControl</api/user_interface/mobile/mobileuicontrol>` |        |
| `Controls<mobilescreen.controls>`                         |                                                                                                                                                                                                                                                                            | `Iterable</api/language/iterable>`                            |        |
| `Handle<mobilescreen.handle>`                             |                                                                                                                                                                                                                                                                            | `Ptr</api/data_types/additional_types/ptr>`                   |        |
| `Objects<mobilescreen.objects>`                           |                                                                                                                                                                                                                                                                            | `Iterable</api/language/iterable>`                            |        |
| `RemoveConstraint<mobilescreen.removeconstraint>`         | constraint As `iOSLayoutConstraint</api/ios/ioslayoutconstraint>`                                                                                                                                                                                                          |                                                               |        |
|                                                           | name As `String</api/data_types/string>`                                                                                                                                                                                                                                   |                                                               |        |
| `RemoveControl<mobilescreen.removecontrol>`               | child As `MobileUIControl</api/user_interface/mobile/mobileuicontrol>`                                                                                                                                                                                                     |                                                               |        |
| `Show<mobilescreen.show>`                                 | parent As <span class="title-ref">MobileScreen</span> = `Nil</api/language/nil>`                                                                                                                                                                                           |                                                               |        |
|                                                           | makeCurrent As `Boolean</api/data_types/boolean>` = `False</api/language/false>`                                                                                                                                                                                           |                                                               |        |
| `ShowModal<mobilescreen.showmodal>`                       | parent As <span class="title-ref">MobileScreen</span> = `Nil</api/language/nil>`, style As `ModalPresentationStyles<mobilescreen.modalpresentationstyles>` = ModalPresentationStyles.Automatic, animate As `Boolean</api/data_types/boolean>` = `True</api/language/true>` |                                                               |        |
| `ShowModal<mobilescreen.showmodal>`                       |                                                                                                                                                                                                                                                                            |                                                               |        |
| `ShowPopover<mobilescreen.showpopover>`                   | parentControl As `MobileToolbarButton</api/user_interface/mobile/mobiletoolbarbutton>`, animated As `Boolean</api/data_types/boolean>` = `True</api/language/true>`                                                                                                        |                                                               |        |
|                                                           | parentControl As `MobileUIControl</api/user_interface/mobile/mobileuicontrol>`, animated As `Boolean</api/data_types/boolean>` = `True</api/language/true>`                                                                                                                |                                                               |        |
| `Size<mobilescreen.size>`                                 |                                                                                                                                                                                                                                                                            | `Size</api/graphics/size>`                                    |        |
| `ViewControllerHandle<mobilescreen.viewcontrollerhandle>` |                                                                                                                                                                                                                                                                            | `Ptr</api/data_types/additional_types/ptr>`                   |        |

## Events

<div class="rst-class">

table-centered_column_4

</div>

| Name                                                      | Parameters                                                                      | Returns                            |
|-----------------------------------------------------------|---------------------------------------------------------------------------------|------------------------------------|
| `Activated<mobilescreen.activated>`                       |                                                                                 |                                    |
| `AppearanceChanged<mobilescreen.appearancechanged>`       | dark As `Boolean</api/data_types/boolean>`                                      |                                    |
| `Closing<mobilescreen.closing>`                           |                                                                                 |                                    |
| `Deactivated<mobilescreen.deactivated>`                   |                                                                                 |                                    |
| `KeyDown<mobilescreen.keydown>`                           | key As `String</api/data_types/string>`                                         | `Boolean</api/data_types/boolean>` |
| `KeyUp<mobilescreen.keyup>`                               | key As `String</api/data_types/string>`                                         |                                    |
| `MenuItemSelected<mobilescreen.menuitemselected>`         | menu As `MobileMenuItem</api/user_interface/mobile/mobilemenuitem>`             |                                    |
| `Opening<mobilescreen.opening>`                           |                                                                                 |                                    |
| `OrientationChanged<mobilescreen.orientationchanged>`     |                                                                                 |                                    |
| `Resized<mobilescreen.resized>`                           |                                                                                 |                                    |
| `ToolbarButtonPressed<mobilescreen.toolbarbuttonpressed>` | button As `MobileToolbarButton</api/user_interface/mobile/mobiletoolbarbutton>` |                                    |

## Enumerations

<div id="mobilescreen.largetitledisplaymodes">

<div class="rst-class">

forsearch

</div>

</div>

MobileScreen.LargeTitleDisplayModes

### LargeTitleDisplayModes

> Used to specify how the screen's title should display.
>
> | Enum      | Description                                                             |
> |-----------|-------------------------------------------------------------------------|
> | Automatic | Keep the title bar in whatever state is was for the previous screen.    |
> | Always    | The title is always displayed large, regardless of the previous screen. |
> | Never     | The title never displays in large size.                                 |

<div id="mobilescreen.modalpresentationstyles">

<div class="rst-class">

forsearch

</div>

</div>

MobileScreen.ModalPresentationStyles

### ModalPresentationStyles

> The various ways in which a modal screen can be displayed.
>
> | Enum               | Description                                                          |
> |--------------------|----------------------------------------------------------------------|
> | Automatic          | Default style chosen by the system.                                  |
> | CurrentContext     | Appears entirely in front of the current screen.                     |
> | Custom             | Can be used with declares or plugins for custom animators.           |
> | FormSheet          | Appears in front of, but not entirely obscuring, the current screen. |
> | FullScreen         | Appears entirely in front of the current screen.                     |
> | OverCurrentContext | Appears entirely in front of the current screen.                     |
> | OverFullScreen     | Appears entirely in front of the current screen.                     |
> | PageSheet          | Appears in front of, but not entirely obscuring, the current screen. |
> | Popover            | Appears in a Popover view (for iPad).                                |

## Property descriptions

<div id="mobilescreen.backbuttoncaption">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.BackButtonCaption

**BackButtonCaption** As `String</api/data_types/string>`

> The caption of the Back button that takes the user back to the current Screen.
>
> The title of the Back button does not appear on the Back button for this Screen, but instead appears on the Back button for any Screens shown by this Screen (using the `Show<mobilescreen.show>` method). It is the caption for the Back button that goes back to this Screen.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This is supported for iOS only.
>
> </div>
>
> ``` xojo
> Self.BackButtonCaption = "Customers"
> ```

<div id="mobilescreen.backgroundcolor">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.BackgroundColor

**BackgroundColor** As `ColorGroup</api/graphics/colorgroup>`

> The background color for the <span class="title-ref">MobileScreen</span>.
>
> This code sets the value of the BackgroundColor property:
>
> ``` xojo
> Me.BackgroundColor = &c110034
> ```

<div id="mobilescreen.bottomlayoutguide">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.BottomLayoutGuide

**BottomLayoutGuide** As `Object</api/data_types/additional_types/object>`

> The bottom layout guide for the Screen.
>
> This property is read-only.
>
> This is used when creating `` iOSLayoutConstraint</api/ios/ioslayoutconstraint>`s. For a Screen, :ref:`iOSLayoutConstraint.AttributeTypes<ioslayoutconstraint.attributetypes> ``.Bottom is the absolute bottom of the View. BottomLayoutGuide is adjusted for things such as a Toolbar or TabBar.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This is supported for iOS only.
>
> </div>

<div id="mobilescreen.controlcount">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.ControlCount

**ControlCount** As `Integer</api/data_types/integer>`

> The number of controls on the Screen.
>
> This property is read-only.
>
> Get the number of controls on the Screen:
>
> ``` xojo
> Var count As Integer = Self.ControlCount
> ```

<div id="mobilescreen.hasbackbutton">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.HasBackButton

**HasBackButton** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>` the Back button appears in the navigation bar.
>
> This property is design time only.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This property is only supported for Android.
>
> </div>

<div id="mobilescreen.hasnavigationbar">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.HasNavigationBar

**HasNavigationBar** As `Boolean</api/data_types/boolean>`

> Indicates whether the Navigation Bar is visible.
>
> The Navigation Bar must be visible in order to see the Title, LeftNavigationToolbar, RightNavigationToolbar or Back button.
>
> Display the Navigation Bar:
>
> ``` xojo
> Self.HasNavigationBar = True
> ```

<div id="mobilescreen.largetitledisplaymode">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.LargeTitleDisplayMode

**LargeTitleDisplayMode** As `LargeTitleDisplayModes<mobilescreen.largetitledisplaymodes>`

> Dictates if and when the screen title should be displayed in a larger size.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This is supported for iOS only.
>
> </div>
>
> ``` xojo
> ' Always display the title in a large font size
> Self.LargeTitleDisplayMode = MobileScreen.LargeTitleDisplayModes.Always
> ```

<div id="mobilescreen.lastcontrolindex">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.LastControlIndex

**LastControlIndex** As `Integer</api/data_types/integer>`

> The index of the last `MobileControl</api/user_interface/mobile/mobilecontrol>` on the <span class="title-ref">MobileScreen</span>.

<div id="mobilescreen.leftnavigationtoolbar">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.LeftNavigationToolbar

**LeftNavigationToolbar** As `MobileToolbar</api/user_interface/mobile/mobiletoolbar>`

> The toolbar to display to the left of the Navigation Bar.
>
> This is only visible when `HasNavigationBar<mobilescreen.hasnavigationbar>` = `True</api/language/true>`.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This is supported for iOS only.
>
> </div>
>
> Add a button to the left Navigation Bar:
>
> ``` xojo
> Var cameraButton As New MobileToolbarButton(MobileToolbarButton.Types.Camera)
> LeftNavigationToolbar.AddButton(cameraButton)
> ```

<div id="mobilescreen.minimizetabbar">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.MinimizeTabBar

**MinimizeTabBar** As `Boolean</api/data_types/boolean>`

> Allows the Tab Bar to automatically minimize when the user scrolls down.
>
> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> This property only has an effect when the app is running on iOS 26 or later.
>
> </div>

<div id="mobilescreen.modal">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.Modal

**Modal** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>` the screen will be displayed as a modal screen.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This is supported for Android only.
>
> </div>

<div id="mobilescreen.navigationbarcolor">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.NavigationBarColor

**NavigationBarColor** As `ColorGroup</api/graphics/colorgroup>`

> The background color for the navigation bar of the <span class="title-ref">MobileScreen</span>.
>
> This code sets the value of the NavigationBarColor property:
>
> ``` xojo
> Me.NavigationBarColor = Color.Yellow
> ```

<div id="mobilescreen.navigationbarheight">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.NavigationBarHeight

**NavigationBarHeight** As `Integer</api/data_types/integer>`

> The height (in points) of the navigation bar.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This is supported for Android only.
>
> </div>

<div id="mobilescreen.navigationbartextcolor">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.NavigationBarTextColor

**NavigationBarTextColor** As `ColorGroup</api/graphics/colorgroup>`

> The text color for the navigation bar of the <span class="title-ref">MobileScreen</span>.
>
> This code sets the value of the NavigationBarTextColor property:
>
> ``` xojo
> Me.NavigationBarTextColor = Color.Red
> ```

<div id="mobilescreen.navigationtoolbar">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.NavigationToolbar

**NavigationToolbar** As `MobileToolbar</api/user_interface/mobile/mobiletoolbar>`

> The screen's toolbar.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This is supported for Android only.
>
> </div>

<div id="mobilescreen.parentsplitscreen">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.ParentSplitScreen

**ParentSplitScreen** As `iOSSplitView</api/ios/iossplitview>`

> Indicates the split Screen that is the owner of this Screen. It is `Nil</api/language/nil>` is there is no split screen.
>
> This property is read-only.
>
> A split screen can only be used on iPad devices. Use this property to determine if a `iOSSplitView</api/ios/iossplitview>` is displayed. You can then use it to get access to the Master and Detail screens that are displayed.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This is supported for iOS only.
>
> </div>
>
> If a `iOSSplitView</api/ios/iossplitview>` is used, then populate the detail side, otherwise, push a new screen onto the `iOSSplitView</api/ios/iossplitview>`:
>
> ``` xojo
> If Self.ParentSplitScreen <> Nil Then
>   ' In the SelectionChanged event for a Table on a Master view of the split screen.
>   ' Gets the Text for the selected row and
>   ' assigns it to a Label on the DetailScreen of the split screen.
>   DetailScreen(Self.ParentSplitScreen.Detail).Label1.Text = Me.RowCellData(row).Text
> Else
>   ' No split screen, so this is a phone.
>   ' Display the Detail Screen and update the text for its label.
>   Var d As New DetailScreen
>   d.Label1.Text = Me.RowCellData(row).Text
>   d.Show
> End If
> ```

<div id="mobilescreen.parenttabbar">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.ParentTabBar

**ParentTabBar** As `iOSTabBar</api/ios/iostabbar>`

> Indicates the Tab Bar that is the owner of this Screen. It is `Nil</api/language/nil>` if there is no Tab Bar.
>
> This property is read-only.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This is supported for iOS only.
>
> </div>
>
> Add a new View to the Tab Bar:
>
> ``` xojo
> ' This code (on a Screen) adds Screen3 to the Tab Bar
> If Self.ParentTabBar <> Nil Then
>   Var v As New Screen3
>   Self.ParentTabBar.AddTab(v)
> End If
> ```

<div id="mobilescreen.rightnavigationtoolbar">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.RightNavigationToolbar

**RightNavigationToolbar** As `MobileToolbar</api/user_interface/mobile/mobiletoolbar>`

> The toolbar to display to the right of the Navigation Bar.
>
> This is only visible when `HasNavigationBar<mobilescreen.hasnavigationbar>` = `True</api/language/true>`.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This is supported for iOS only.
>
> </div>
>
> Add a button to the right Navigation Bar:
>
> ``` xojo
> Var cameraButton As New MobileToolbarButton(MobileToolbarButton.Types.Camera)
> RightNavigationToolbar.AddButton(cameraButton)
> ```

<div id="mobilescreen.scalefactor">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.ScaleFactor

**ScaleFactor** As `Double</api/data_types/double>`

> The scale factor used when converting user space coordinates to backing store coordinates for this <span class="title-ref">MobileScreen</span>.
>
> This property is read-only.

<div id="mobilescreen.tabbarvisible">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.TabBarVisible

**TabBarVisible** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, the tab bar is visible when the screen. This can only bet set at runtime on iOS/iPadOS 18 or greater.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This is supported for iOS only.
>
> </div>

<div id="mobilescreen.tabicon">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.TabIcon

**TabIcon** As `Picture</api/graphics/picture>`

> The icon for the tab upon which this Screen is displayed.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This is supported for iOS only.
>
> </div>

<div id="mobilescreen.tintcolor">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.TintColor

**TintColor** As `ColorGroup</api/graphics/colorgroup>`

> Overrides the default tint color of controls within this screen, for example Button captions, Progress Bars and Slider tracks.
>
> The TintColor can be a `ColorGroup</api/graphics/colorgroup>` created in code or one you have created as a project item.
>
> Because this is a `ColorGroup</api/graphics/colorgroup>`, you can create a Dual-color `ColorGroup</api/graphics/colorgroup>` so that the TintColor will automatically be correct in Dark versus Light mode.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This is supported for iOS only.
>
> </div>
>
> In the `Opening<mobilescreen.opening>` event, set the background color to a `ColorGroup</api/graphics/colorgroup>` in the project called *MyTheme*:
>
> ``` xojo
> Me.TintColor = MyTheme
> ```

<div id="mobilescreen.title">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.Title

**Title** As `String</api/data_types/string>`

> The title for the Navigation Bar.
>
> This only appears if `HasNavigationBar<mobilescreen.hasnavigationbar>` is `True</api/language/true>`.
>
> Change the title for the Screen:
>
> ``` xojo
> Self.Title = "Customers"
> ```

<div id="mobilescreen.toolbar">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.Toolbar

**Toolbar** As `MobileToolbar</api/user_interface/mobile/mobiletoolbar>`

> The toolbar that is displayed in the Screen, typically at the bottom.
>
> Add a button to the Toolbar:
>
> ``` xojo
> Var button As New MobileToolbarButton(MobileToolbarButton.Types.Camera)
> Toolbar.AddButton(button)
> ```

<div id="mobilescreen.toplayoutguide">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.TopLayoutGuide

**TopLayoutGuide** As `Object</api/data_types/additional_types/object>`

> The top layout guide for the Screen.
>
> This property is read-only.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This is supported for iOS only.
>
> </div>
>
> This is used when creating `` iOSLayoutConstraint</api/ios/ioslayoutconstraint>`s. For a Screen, :ref:`iOSLayoutConstraint.AttributeTypes<ioslayoutconstraint.attributetypes> ``.Top is the absolute top of the View. TopLayoutGuide is adjusted for things such as a NavigationBar.

## Method descriptions

<div id="mobilescreen.addconstraint">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.AddConstraint

**AddConstraint**(constraint As `iOSLayoutConstraint</api/ios/ioslayoutconstraint>`, name As `String</api/data_types/string>` = "")

> Adds the *constraint* to the Screen. The optional *name* parameter can be used to `remove a constraint<mobileuicontrol.removeconstraint>` that was added via code.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This is supported for iOS only.
>
> </div>

<div id="mobilescreen.addcontrol">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.AddControl

**AddControl**(child As `MobileUIControl</api/user_interface/mobile/mobileuicontrol>`)

> Adds a control to the Screen.
>
> ``` xojo
> Var ctrl As New MobileSwitch
> ' Send its ValueChanged event to the SwitchValueChanged method on the View
> AddHandler ctrl.ValueChanged, AddressOf SwitchValueChanged
> Self.AddControl(ctrl)
> ```

<div id="mobilescreen.close">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.Close

**Close**

> For Screens that were displayed using Show or ShowModal, this closes the Screen causing the previous Screen to display.
>
> Since calling Close displays the previous Screen, you can call it to simulate the user pressing a "Back" button on the Screen.
>
> You cannot close the main Screen (the one that is specified as the Content for the iOS Layout), however you can swap in another Screen by using the `MobileApplication.CurrentLayout<mobileapplication.currentlayout>` property.

<div id="mobilescreen.constraint">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.Constraint

**Constraint**(name As `String</api/data_types/string>`) As `iOSLayoutConstraint</api/ios/ioslayoutconstraint>`

> Gets a reference to a named constraint so that you can modify its settings in code.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This is supported for iOS only.
>
> </div>
>
> Change an existing (and named) constraint of a control on the Screen:
>
> ``` xojo
> ' "TAWidth" is a width constraint for a TextField that has been given
> ' a name in the auto-layout Inspector properties.
> Var c As iOSLayoutConstraint = Self.Constraint("TAWidth")
> c.Offset = 200
> ```

<div id="mobilescreen.contentsize">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.ContentSize

**ContentSize** As `Size</api/graphics/size>`

> The size (in points) of the content area of the Screen. This excludes the Navigation Bar, Tab Bar and Toolbar if they are on the Screen.
>
> Get the content size of the Screen:
>
> ``` xojo
> Var screenSize As String = Self.ContentSize.Width.ToString + " by " + Self.ContentSize.Height.ToString
> ```

<div id="mobilescreen.controlat">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.ControlAt

**ControlAt**(index As `Integer</api/data_types/integer>`) As `MobileUIControl</api/user_interface/mobile/mobileuicontrol>`

> Gets the control at the *index* passed.
>
> Get the name of the first control on the Screen:
>
> ``` xojo
> Var controlName As String = Self.ControlAt(0).Name
> ```

<div id="mobilescreen.controls">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.Controls

**Controls** As `Iterable</api/language/iterable>`

> Used to iterate through the controls on a Screen.
>
> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> This does not include non-control object instances. For that, use the `Objects<mobilescreen.objects>` method.
>
> </div>
>
> All controls on the Screen are returned as a the `MobileControl</api/user_interface/mobile/mobilecontrol>` base type. You can use the IsA operator to check the specific type to see if the control is a MobileButton, MobileLabel, etc.
>
> Loop through all the controls on a Screen and disable only the TextFields:
>
> ``` xojo
> For Each c As MobileUIControl In Self.Controls
>   If c IsA MobileTextField Then
>     MobileTextField(c).Enabled = False
>   End If
> Next
> ```

<div id="mobilescreen.handle">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.Handle

**Handle** As `Ptr</api/data_types/additional_types/ptr>`

> The handle to use when creating `Declares</api/language/declare>` to the underlying OS object.
>
> On iOS, the underlying OS object is a UIView.

<div id="mobilescreen.objects">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.Objects

**Objects** As `Iterable</api/language/iterable>`

> Allows you to iterate through all the non-control object instances on the <span class="title-ref">MobileScreen</span>.
>
> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> This does not include controls. For that, use the `Controls<mobilescreen.controls>` method.
>
> </div>

<div id="mobilescreen.removeconstraint">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.RemoveConstraint

**RemoveConstraint**(constraint As `iOSLayoutConstraint</api/ios/ioslayoutconstraint>`)

> Removes the *constraint* from the Screen.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This is supported for iOS only.
>
> </div>

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

**RemoveConstraint**(name As `String</api/data_types/string>`)

> Removes the constraint with the *name* passed from the Screen.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This is supported for iOS only.
>
> </div>

<div id="mobilescreen.removecontrol">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.RemoveControl

**RemoveControl**(child As `MobileUIControl</api/user_interface/mobile/mobileuicontrol>`)

> Removes the relationship between the *child* control and the its parent. It **does not** remove the control itself.

<div id="mobilescreen.show">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.Show

**Show**(parent As <span class="title-ref">MobileScreen</span> = `Nil</api/language/nil>`)

> Displays the Screen by *pushing* it over the *parent* Screen passed.
>
> Show displays a new Screen over the current Screen, placing it on the "stack" so that the back functionality of the new Screen can be used to go back to the previous Screen. If you need to just change the current Screen without affecting the stack, you can do so by using the `MobileApplication.CurrentLayout<mobileapplication.currentlayout>` property.
>
> Use the Close method to close the new Screen and go back to the previous Screen.
>
> If you using an `iOSTabBar</api/ios/iostabbar>` or using an `iOSSplitView</api/ios/iossplitview>`, you'll need to pass as the *parent* parameter the <span class="title-ref">MobileScreen</span> in front of which you wish the modal dialog to appear.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This signature is supported for iOS only.
>
> </div>
>
> Displays a new Screen:
>
> ``` xojo
> Var newScreen As New Screen2
> newScreen.Show
> ```

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="rst-class">

forsearch

</div>

MobileScreen.Show

**Show**(makeCurrent As `Boolean</api/data_types/boolean>` = `False</api/language/false>`)

> Displays the Screen by *pushing* it over the current screen such that pressing the Back button will take the user back to the previous screen.
>
> If *makeCurrent* is `True</api/language/true>` then the current screen is replaced by this screen and as such, the Back button will not take the user back to the previous screen.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This signature is supported for Android only.
>
> </div>

<div id="mobilescreen.showmodal">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.ShowModal

For iOS:

**ShowModal**(parent As <span class="title-ref">MobileScreen</span> = `Nil</api/language/nil>`, style As `ModalPresentationStyles<mobilescreen.modalpresentationstyles>` = ModalPresentationStyles.Automatic, animate As `Boolean</api/data_types/boolean>` = `True</api/language/true>`)

> If you using an `iOSTabBar</api/ios/iostabbar>` or using an `iOSSplitView</api/ios/iossplitview>`, you'll need to pass as the *parent* parameter the <span class="title-ref">MobileScreen</span> in front of which you wish the modal dialog to appear.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This is supported for iOS only. For Android, use the `Modal<mobilescreen.modal>` property instead.
>
> </div>

For Android:

**ShowModal**

> Displays the Screen passed as a modal Screen.
>
> A modal Screen has no navigation bar with a back button the user can use to return to the previous screen.
>
> Show a dialog from the current Screen:
>
> ``` xojo
> Var login As New LoginDialog
> login.ShowModal
> ```

<div id="mobilescreen.showpopover">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.ShowPopover

**ShowPopover**(parentControl As `MobileToolbarButton</api/user_interface/mobile/mobiletoolbarbutton>`, animated As `Boolean</api/data_types/boolean>` = `True</api/language/true>`)

> Displays the screen as a popover below the *parentControl*.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This method is not currently supported for Android.
>
> </div>

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

**ShowPopover**(parentControl As `MobileUIControl</api/user_interface/mobile/mobileuicontrol>`, animated As `Boolean</api/data_types/boolean>` = `True</api/language/true>`)

> Displays the screen as a popover on top of the *parentControl's* screen.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This method is not currently supported for Android.
>
> </div>
>
> This example from a `button's Pressed</api/user_interface/mobile/mobilebutton>` event displays the screen named *MyPopover*:
>
> ``` xojo
> Var c As New MyPopover
> c.ShowPopover(Me)
> ```

<div id="mobilescreen.size">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.Size

**Size** As `Size</api/graphics/size>`

> The size (in points) of the entire Screen area.
>
> Get the size of the Screen:
>
> ``` xojo
> Var screenSize As String = Self.Size.Width.ToString + " by " + Self.Size.Height.ToString
> ```

<div id="mobilescreen.viewcontrollerhandle">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.ViewControllerHandle

**ViewControllerHandle** As `Ptr</api/data_types/additional_types/ptr>`

> The handle to use when creating `Declares</api/language/declare>` to the underlying OS object.
>
> On iOS, the underlying OS object is a UIViewController.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This is supported for iOS only.
>
> </div>

## Event descriptions

<div id="mobilescreen.activated">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.Activated

**Activated**

> Called when the Screen is activated.
>
> This occurs when:
>
> - the screen first opens
> - the screen reappears after a screen pushed from it is closed

<div id="mobilescreen.appearancechanged">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.AppearanceChanged

**AppearanceChanged**(dark As `Boolean</api/data_types/boolean>`)

> Called when a user switches between Light and Dark mode.
>
> Use this event to update any graphics or other UI as needed.

<div id="mobilescreen.closing">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.Closing

**Closing**

> Called when the Screen is closed by calling the `Close<mobilescreen.close>` method.

<div id="mobilescreen.deactivated">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.Deactivated

**Deactivated**

> Called when the Screen is deactivated.
>
> This occurs when:
>
> - The Screen is closed by calling the Close method or the user tapping the Back button
> - Another Screen is opened (pushed) onto this Screen

<div id="mobilescreen.keydown">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.KeyDown

**KeyDown**(key As `String</api/data_types/string>`) As `Boolean</api/data_types/boolean>`

> The passed *key* has been pressed and not handled by a control on the <span class="title-ref">MobileScreen</span>. For example, The tab key is never sent to any control. It is instead handled by the <span class="title-ref">MobileScreen</span> itself. If the <span class="title-ref">MobileScreen</span> has no controls that can receive the focus, any keys that are pressed will generate KeyDown events for the <span class="title-ref">MobileScreen</span>. This event handler is passed a parameter that tells you which key was pressed.
>
> Returns a `Boolean</api/data_types/boolean>`. Returning `True</api/language/true>` means that no further processing is to be done with the Key, although the KeyUp event is still called.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This is supported for iOS only.
>
> </div>

<div id="mobilescreen.keyup">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.KeyUp

**KeyUp**(key As `String</api/data_types/string>`)

> Fires when the passed *key* is released and no other control on the <span class="title-ref">MobileScreen</span> has captured the event. It is not guaranteed to be the same key that received the `KeyDown<MobileScreen.keydown>` event.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This is supported for iOS only.
>
> </div>

<div id="mobilescreen.menuitemselected">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.MenuItemSelected

**MenuItemSelected**(menu As `MobileMenuItem</api/user_interface/mobile/mobilemenuitem>`)

> Raised when the user selects a menu item or presses a keyboard shortcut assigned to a menu item while the menu is visible.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This event is not currently supported for Android.
>
> </div>

<div id="mobilescreen.opening">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.Opening

**Opening**

> Called when the Screen first appears and typically used for initialization.

<div id="mobilescreen.orientationchanged">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.OrientationChanged

**OrientationChanged**

> The device has been rotated enough to switch between portrait and landscape orientations. This event also occurs immediately after the `Opening<mobilescreen.opening>` event should the app need to make changes based upon device orientation.
>
> For an iOS app, if this event isn't firing as expected, make sure you check the orientations that you have enabled for the layout you are using.
>
> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> Not every rotation of a device changes the orientation of the app. For example, when the device is in landscape orientation and is turned upside down, the orientation does not change and thus this event does not fire.
>
> </div>

<div id="mobilescreen.resized">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.Resized

**Resized**

> The screen's size has changed.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This is supported for iOS only.
>
> </div>

<div id="mobilescreen.toolbarbuttonpressed">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MobileScreen.ToolbarButtonPressed

**ToolbarButtonPressed**(button As `MobileToolbarButton</api/user_interface/mobile/mobiletoolbarbutton>`)

> Called when a *button* on the left or right Navigation Bar or the Toolbar is pressed.
>
> Check for a button pressed based on its caption:
>
> ``` xojo
> Select Case button.Caption
> Case "Save"
>   ' call save code
> Case "Edit"
>   ' call edit code
> End Select
> ```
>
> Check for a button pressed based on its type:
>
> ``` xojo
> Select Case button.Type
> Case MobileToolbarButton.Types.Save
>   ' call save code
> Case MobileToolbarButton.Types.Edit
>   ' call edit code
> End Select
> ```

## Notes

A Screen is the mobile equivalent of a window for the desktop or a webpage for the web.

## Interfaces

This class implements the `iOSLayoutContent</api/ios/ioslayoutcontent>`, `iOSSplitContent</api/ios/iossplitcontent>`, `iOSTabContent</api/ios/iostabcontent>` and the iOSViewController class interfaces on iOS.

## Compatibility

|                       |        |
|-----------------------|--------|
| **Project Types**     | Mobile |
| **Operating Systems** | All    |

<div id="mobilescreen/see_also">

<div class="seealso">

`Object</api/data_types/additional_types/object>` parent class; `iOSTabBar</api/ios/iostabbar>`, `MobileToolbar</api/user_interface/mobile/mobiletoolbar>`, `iOSLayoutConstraint</api/ios/ioslayoutconstraint>`, `iOSSplitView</api/ios/iossplitview>` classes.

</div>

</div>
