MobileScreen.ParentSplitScreen
From Xojo Documentation
Read-Only Property (As iOSSplitView )
Indicates the split Screen that is the owner of this Screen. It is Nil is there is no split screen.
Notes
A split screen can only be used on iPad devices. Use this property to determine if a iOSSplitView is displayed. You can then use it to get access to the Master and Detail screens that are displayed.
Sample Code
If a iOSSplitView is used, then populate the detail side, otherwise, push a new screen onto the iOSSplitView:
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
// 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
Compatibility
iOS project types on iPadOS only.