Class
iOSTabBar
Description
An iOS TabBar.
Properties
Name |
Type |
Read-Only |
Shared |
|---|---|---|---|
Methods
Name |
Parameters |
Returns |
Shared |
|---|---|---|---|
content As iOSTabContent |
|||
index As Integer |
|||
index As Integer |
|||
index As Integer |
|||
Events
Name |
Parameters |
Returns |
|---|---|---|
dark As Boolean |
Property descriptions
iOSTabBar.BackgroundColor
BackgroundColor As ColorGroup
The background color for the iOSTabBar.
This code sets the value of the BackgroundColor property:
Me.BackgroundColor = Color.AccentThemeColor
iOSTabBar.BadgeColor
BadgeColor As ColorGroup
The badge color for the iOSTabBar.
iOSTabBar.BadgeTextColor
BadgeTextColor As ColorGroup
The color for the text used in the badge(s) for the iOSTabBar.
iOSTabBar.SelectedIndex
SelectedIndex As Integer
Used to get or set the visible tab panel. The first item is zero.
The following example changes the selected tab to the third item at the Screens Opening-Event:
Self.ParentTabBar.SelectedIndex = 2
iOSTabBar.SelectedTabTextColor
SelectedTabTextColor As ColorGroup
The text color for the selected tab in the iOSTabBar.
iOSTabBar.TabCount
TabCount As Integer
Used to get the number of tabs in the iOSTabBar.
iOSTabBar.UnselectedTabTextColor
UnselectedTabTextColor As ColorGroup
The text color for the unselected tab(s) in the iOSTabBar.
Method descriptions
iOSTabBar.AddTab
AddTab(content As iOSTabContent)
Adds an iOSView to the tab bar.
This code (on a View) add View3 to the TabBar:
If Self.ParentTabBar <> Nil Then Var v As New View3 Self.ParentTabBar.AddTab(v) End If
iOSTabBar.BadgeAt
BadgeAt(index As Integer) As String
Gets the badge on the tab at the index passed.
BadgeAt(index As Integer, Assigns value As String)
Sets the badge on the tab at the index passed. If the badge is set to an empty string, the badge is removed.
iOSTabBar.CaptionAt
CaptionAt(index As Integer) As String
Gets the caption for the tab at the index passed.
CaptionAt(index As Integer, Assigns value As String)
Sets the caption for the tab at the index passed.
iOSTabBar.IconAt
IconAt(index As Integer) As Picture
Gets the Picture representing the icon for the tab at the index passed.
IconAt(index As Integer, Assigns image As Picture)
Sets the icon for the tab at the index passed to the image passed.
iOSTabBar.ViewControllerHandle
ViewControllerHandle As Ptr
The handle to use when creating Declares to the underlying OS object.
On iOS, the underlying OS object is a UIViewController.
Event descriptions
iOSTabBar.AppearanceChanged
AppearanceChanged(dark As Boolean)
Called when a user switches between Light and Dark mode.
Use this event to update any graphics or other UI as needed.
Notes
You set up a tab bar using the Inspector to change the Content property for an iOSLayout. Refer to Getting Started with iOS for information on how to do this. From the Apple User Interface Guidelines, a tab bar:
Is translucent
Always appears at the bottom edge of the screen
Displays no more than five tabs at one time in a horizontally compact environment (if there are more tabs, the tab bar displays four of them and adds the More tab, which reveals the additional tabs in a list)
Maintains the same height in all orientations
Can display a badge on a tab to communicate app-specific information (a badge is a red oval containing white text and either a number or exclamation point)
Regardless of the icon's visual style, create a tab bar icon in the following sizes: About 50 x 50 pixels (96 x 64 pixels maximum). Don't include text in a custom tab bar icon.
Compatibility
Project Types |
Mobile |
Operating Systems |
iOS |
See also
Object parent class; iOSLayout, MobileScreen, iOSTabContent