<div class="meta" robots="noindex">

</div>

Class

# iOSView

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

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2020r2. Please use `MobileScreen</api/user_interface/mobile/mobilescreen>` as a replacement.

</div>

## Description

The View is where you design your iOS layouts.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                                                     | Type                                              | Read-Only | Shared |
|----------------------------------------------------------|---------------------------------------------------|-----------|--------|
| `BackButtonTitle<iosview.backbuttontitle>`               | `Text</api/deprecated/text>`                      |           |        |
| `BottomLayoutGuide<iosview.bottomlayoutguide>`           | `Object</api/data_types/additional_types/object>` | ✓         |        |
| `LargeTitleMode<iosview.largetitlemode>`                 | `LargeTitleModes<iosview.largetitlemodes>`        |           |        |
| `LeftNavigationToolbar<iosview.leftnavigationtoolbar>`   | `iOSToolbar</api/deprecated/iostoolbar>`          |           |        |
| `NavigationBarVisible<iosview.navigationbarvisible>`     | `Boolean</api/data_types/boolean>`                |           |        |
| `ParentSplitView<iosview.parentsplitview>`               | `iOSSplitView</api/ios/iossplitview>`             | ✓         |        |
| `ParentTabBar<iosview.parenttabbar>`                     | `iOSTabBar</api/ios/iostabbar>`                   | ✓         |        |
| `RightNavigationToolbar<iosview.rightnavigationtoolbar>` | `iOSToolbar</api/deprecated/iostoolbar>`          |           |        |
| `TabIcon<iosview.tabicon>`                               | `iOSImage</api/deprecated/iosimage>`              |           |        |
| `TabTitle<iosview.tabtitle>`                             | `Text</api/deprecated/text>`                      |           |        |
| `Title<iosview.title>`                                   | `Text</api/deprecated/text>`                      |           |        |
| `Toolbar<iosview.toolbar>`                               | `iOSToolbar</api/deprecated/iostoolbar>`          |           |        |
| `TopLayoutGuide<iosview.toplayoutguide>`                 | `Object</api/data_types/additional_types/object>` | ✓         |        |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                         | Parameters                                                         | Returns                                                   | Shared |
|----------------------------------------------|--------------------------------------------------------------------|-----------------------------------------------------------|--------|
| `AddConstraint<iosview.addconstraint>`       | constraint As `iOSLayoutConstraint</api/ios/ioslayoutconstraint>`  |                                                           |        |
| `AddControl<iosview.addcontrol>`             | child As `MobileControl</api/user_interface/mobile/mobilecontrol>` |                                                           |        |
| `Close<iosview.close_method>`                |                                                                    |                                                           |        |
| `Constraint<iosview.constraint>`             | name As `String</api/data_types/string>`                           | `iOSLayoutConstraint</api/ios/ioslayoutconstraint>`       |        |
| `ContentSize<iosview.contentsize>`           |                                                                    | `Size</api/graphics/size>`                                |        |
| `Control<iosview.control>`                   | index As `Integer</api/data_types/integer>`                        | `MobileControl</api/user_interface/mobile/mobilecontrol>` |        |
| `ControlCount<iosview.controlcount>`         |                                                                    | `Integer</api/data_types/integer>`                        |        |
| `Handle<iosview.handle>`                     |                                                                    | `Ptr</api/data_types/additional_types/ptr>`               |        |
| `PushTo<iosview.pushto>`                     | newView As iOSView                                                 |                                                           |        |
| `RemoveConstraint<iosview.removeconstraint>` | constraint As `iOSLayoutConstraint</api/ios/ioslayoutconstraint>`  |                                                           |        |
| `RemoveControl<iosview.removecontrol>`       | child As `MobileControl</api/user_interface/mobile/mobilecontrol>` |                                                           |        |
| `Size<iosview.size>`                         |                                                                    | `Size</api/graphics/size>`                                |        |

## Events

<div class="rst-class">

table-centered_column_4

</div>

| Name                                           | Parameters                                                                      | Returns |
|------------------------------------------------|---------------------------------------------------------------------------------|---------|
| `Activate<iosview.activate>`                   |                                                                                 |         |
| `AppearanceChanged<iosview.appearancechanged>` | dark As `Boolean</api/data_types/boolean>`                                      |         |
| `Close<iosview.close_event>`                   |                                                                                 |         |
| `Deactivate<iosview.deactivate>`               |                                                                                 |         |
| `Open<iosview.open>`                           |                                                                                 |         |
| `Resized<iosview.resized>`                     |                                                                                 |         |
| `ToolbarPressed<iosview.toolbarpressed>`       | button As `MobileToolbarButton</api/user_interface/mobile/mobiletoolbarbutton>` |         |

## Enumerations

<div id="iosview.largetitlemodes">

<div class="rst-class">

forsearch

</div>

</div>

iOSView.LargeTitleModes

### LargeTitleModes

Used to specify the value for the LargeTitleMode property. (Automatic, Always, Never) Available in 2018r2.

| 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.                                 |

## Property descriptions

<div id="iosview.backbuttontitle">

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

</div>

<div class="rst-class">

forsearch

</div>

iOSView.BackButtonTitle

**BackButtonTitle** As `Text</api/deprecated/text>`

The back button that gets back to this View uses the text specified here.

This title does not appear on the back button for this View, but instead appears on the back button for any Views shown by this View (using PushTo). It is the title for the back button that goes back to this view.

``` xojo
Self.BackButtonTitle = "Customers"
```

<div id="iosview.bottomlayoutguide">

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

</div>

<div class="rst-class">

forsearch

</div>

iOSView.BottomLayoutGuide

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

The bottom layout guide for the View. For use when creating `iOSLayoutConstraints</api/ios/ioslayoutconstraint>`.

This property is read-only.

For a View, `iOSLayoutConstraint.AttributeTypes<ioslayoutconstraint.attributetypes>`. Bottom is the absolute bottom of the View. BottomLayoutGuide is adjusted for things such as a Toolbar or TabBar.

<div id="iosview.largetitlemode">

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

</div>

<div class="rst-class">

forsearch

</div>

iOSView.LargeTitleMode

**LargeTitleMode** As `LargeTitleModes<iosview.largetitlemodes>`

Enable and controls how titles render in iOS 11+ using the LargeTitleModes enumeration, which has these elements: Automatic, Always, Never (the default). This property does nothing on pre-iOS 11 versions. Available in 2018r2.

<div id="iosview.leftnavigationtoolbar">

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

</div>

<div class="rst-class">

forsearch

</div>

iOSView.LeftNavigationToolbar

**LeftNavigationToolbar** As `iOSToolbar</api/deprecated/iostoolbar>`

The toolbar to display at the left of the Navigation Bar. Only visible when NavigationBarVisible = True.

Add a button to the left Navigation Bar:

``` xojo
LeftNavigationToolbar.Add(iOSToolButton.NewSystemItem(iOSToolButton.Types.SystemAdd))
```

<div id="iosview.navigationbarvisible">

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

</div>

<div class="rst-class">

forsearch

</div>

iOSView.NavigationBarVisible

**NavigationBarVisible** 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.NavigationBarVisible = True
```

<div id="iosview.parentsplitview">

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

</div>

<div class="rst-class">

forsearch

</div>

iOSView.ParentSplitView

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

Indicates the split view that is the owner of this View. It is Nil is there is no split view. A split view can only be used on iPad devices.

This property is read-only.

Use this property to determine if a SplitView is displayed. You can then use it to get access to the Master and Detail views that are displayed.

If a SplitView is used, then populate the detail side, otherwise, push a new view onto the screen:

``` xojo
If Self.ParentSplitView <> Nil Then
  ' On Action event for a Table on a Master view of the SplitView.
  ' Gets the Text for the selected row and
  ' assigns it to a Label on the DetailView of the SplitView.
  DetailView(Self.ParentSplitView.Detail).Label1.Text = Me.RowData(section, row).Text
Else
  ' No SplitView, so this is a phone.
  ' Display the Detail view and update the text for its label.
  Var d As New DetailView
  d.Label1.Text = Me.RowData(section, row).Text
  Self.PushTo(d)
End If
```

<div id="iosview.parenttabbar">

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

</div>

<div class="rst-class">

forsearch

</div>

iOSView.ParentTabBar

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

Indicates the Tab Bar that is the owner of this View. It is Nil if there is no Tab Bar.

This property is read-only.

Add a new View to the Tab Bar:

``` xojo
' This code (on a View) adds View3 to the Tab Bar
If Self.ParentTabBar <> Nil Then
  Var v As New View3
  Self.ParentTabBar.AddTab(v)
End If
```

<div id="iosview.rightnavigationtoolbar">

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

</div>

<div class="rst-class">

forsearch

</div>

iOSView.RightNavigationToolbar

**RightNavigationToolbar** As `iOSToolbar</api/deprecated/iostoolbar>`

The toolbar to display at the right of the Navigation Bar. Only visible when NavigationBarVisible = True.

Add a button to the right Navigation Toolbar:

``` xojo
RightNavigationToolbar.Add(iOSToolButton.NewSystemItem(iOSToolButton.Types.SystemAdd))
```

<div id="iosview.tabicon">

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

</div>

<div class="rst-class">

forsearch

</div>

iOSView.TabIcon

**TabIcon** As `iOSImage</api/deprecated/iosimage>`

The icon for the tab that this View is displayed on.

<div id="iosview.tabtitle">

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

</div>

<div class="rst-class">

forsearch

</div>

iOSView.TabTitle

**TabTitle** As `Text</api/deprecated/text>`

The title for the tab that this View is displayed on.

<div id="iosview.title">

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

</div>

<div class="rst-class">

forsearch

</div>

iOSView.Title

**Title** As `Text</api/deprecated/text>`

The title for the Navigation Bar. This only appears if NavigationBarVisible is True.

Change the title for the View:

``` xojo
Self.Title = "My View"
```

<div id="iosview.toolbar">

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

</div>

<div class="rst-class">

forsearch

</div>

iOSView.Toolbar

**Toolbar** As `iOSToolbar</api/deprecated/iostoolbar>`

The toolbar that is displayed in the View, typically at the bottom.

Add a button to the Toolbar:

``` xojo
Toolbar.Add(iOSToolButton.NewSystemItem(iOSToolButton.Types.SystemAdd))
```

<div id="iosview.toplayoutguide">

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

</div>

<div class="rst-class">

forsearch

</div>

iOSView.TopLayoutGuide

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

The top layout guide for the View. For use when creating `iOSLayoutConstraints</api/ios/ioslayoutconstraint>`.

This property is read-only.

For a View, `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="iosview.addconstraint">

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

</div>

<div class="rst-class">

forsearch

</div>

iOSView.AddConstraint

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

Adds the constraint to the view.

<div id="iosview.addcontrol">

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

</div>

<div class="rst-class">

forsearch

</div>

iOSView.AddControl

**AddControl**(child As `MobileControl</api/user_interface/mobile/mobilecontrol>`)

Adds a control to the View.

Add a control to the View:

``` xojo
Var ctrl As New iOSSwitch
' Send its ValueChanged event to the SwitchValueChanged method on the View
AddHandler ctrl.ValueChanged, AddressOf SwitchValueChanged
Self.AddControl(ctrl)
```

<div id="iosview.close_method">

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

</div>

<div class="rst-class">

forsearch

</div>

iOSView.Close

**Close**

For views that were displayed using PushTo, this closes the View causing the previous View to display.

Since calling Close displays the previous View, you can call it to simulate the user pressing a "Back" button on the View.

You cannot close the main View (the one that is specified as the Content for the Screen), however you can swap in another view by using the `iOSApplication.CurrentScreen<iosapplication.currentscreen>` property.

<div id="iosview.constraint">

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

</div>

<div class="rst-class">

forsearch

</div>

iOSView.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.

Change an existing (and named) constraint of a control on the View:

``` 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="iosview.contentsize">

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

</div>

<div class="rst-class">

forsearch

</div>

iOSView.ContentSize

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

The size (in points) of the content area of the View. This excludes the Navigation Bar, Tab Bar and Toolbar if they are on the View.

Get the content size of the View:

``` xojo
Var screenSize As Text = Self.ContentSize.Width.ToText + " by " + Self.ContentSize.Height.ToText
```

<div id="iosview.control">

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

</div>

<div class="rst-class">

forsearch

</div>

iOSView.Control

**Control**(index As `Integer</api/data_types/integer>`) As `MobileControl</api/user_interface/mobile/mobilecontrol>`

Gets the control at the 0-based index.

Get the name of the first control on the View:

``` xojo
Var controlName As Text = Self.Control(0).Name
```

<div id="iosview.controlcount">

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

</div>

<div class="rst-class">

forsearch

</div>

iOSView.ControlCount

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

The number of controls on the view.

Get the number of controls on the View:

``` xojo
Var count As Integer = Self.ControlCount
```

<div id="iosview.handle">

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

</div>

<div class="rst-class">

forsearch

</div>

iOSView.Handle

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

The handle to use when creating Declares to UIView.

<div id="iosview.pushto">

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

</div>

<div class="rst-class">

forsearch

</div>

iOSView.PushTo

**PushTo**(newView As iOSView)

Displays a new view by "pushing" it onto the current View.

PushTo displays a new View over the current View, placing it on the "stack" so that the back functionality of the new View can be used to go back to the original View. If you need to just change the current View without affecting the stack, you can do so by using the `iOSApplication.CurrentScreen<iosapplication.currentscreen>` property.

Use the Close method to close the new View and go back to the View that called "PushTo".

Displays a new View on the screen:

``` xojo
Var newView As New View2
Self.PushTo(newView)
```

<div id="iosview.removeconstraint">

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

</div>

<div class="rst-class">

forsearch

</div>

iOSView.RemoveConstraint

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

Removes the constraint from the View.

<div id="iosview.removecontrol">

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

</div>

<div class="rst-class">

forsearch

</div>

iOSView.RemoveControl

**RemoveControl**(child As `MobileControl</api/user_interface/mobile/mobilecontrol>`)

Removes the control from the View.

<div id="iosview.size">

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

</div>

<div class="rst-class">

forsearch

</div>

iOSView.Size

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

The size (in points) of the entire View area.

Get the size of the View:

``` xojo
Var screenSize As Text = Self.Size.Width.ToText + " by " + Self.Size.Height.ToText
```

## Event descriptions

<div id="iosview.activate">

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

</div>

<div class="rst-class">

forsearch

</div>

iOSView.Activate

**Activate**

Called when the View is activated.

This occurs when: \* the View first opens \* the View is displayed again after a View that was pushed onto it is closed (either by calling the Close method or by the user tapping the Back button)

<div id="iosview.appearancechanged">

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

</div>

<div class="rst-class">

forsearch

</div>

iOSView.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="iosview.close_event">

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

</div>

<div class="rst-class">

forsearch

</div>

iOSView.Close

**Close**

Called when the View is closed by calling the Close method.

This is called by the Destructor.

<div id="iosview.deactivate">

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

</div>

<div class="rst-class">

forsearch

</div>

iOSView.Deactivate

**Deactivate**

Called when the View is deactivated.

This occurs when: \* the View is closed by calling the Close method or the user tapping the Back button \* another View is opened (pushed) onto this view

<div id="iosview.open">

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

</div>

<div class="rst-class">

forsearch

</div>

iOSView.Open

**Open**

Called when the View first appears and typically used for initialization.

This event is called by the Constructor.

<div id="iosview.resized">

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

</div>

<div class="rst-class">

forsearch

</div>

iOSView.Resized

**Resized**

Called when the View is resized, which can occur when the device orientation changes.

<div id="iosview.toolbarpressed">

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

</div>

<div class="rst-class">

forsearch

</div>

iOSView.ToolbarPressed

**ToolbarPressed**(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 name:

``` xojo
Select Case button.Caption
  Case SaveButton
    ' call save code
  Case EditButton
    ' call edit code
End Select
```

Check for a button pressed based on its type:

``` xojo
Select Case button.Type
Case iOSToolButton.Types.SystemSave
  ' call save code
Case iOSToolButton.Types.SystemEdit
  ' call edit code
End Select
```

## Compatibility

iOS projects on the iOS operating system.

## See also

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