Class

iOSTabBar


Description

An iOS TabBar.

Methods

Name

Parameters

Returns

Shared

AddTab

content As iOSTabContent

BadgeAt

index As Integer

String

CaptionAt

index As Integer

String

Events

Name

Parameters

Returns

AppearanceChanged

dark As Boolean

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 or sets the badge on the tab at the index passed.


iOSTabBar.CaptionAt

CaptionAt(index As Integer) As String

Gets or sets the caption for the tab at the index passed.

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

iOS projects on the iOS operating system.

See also

Object parent class; iOSLayout, MobileScreen, iOSTabContent