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

IconAt

index As Integer

Picture

index As Integer, Assigns image As Picture

ViewControllerHandle

Ptr

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. If the badge is set to an empty string, the badge is removed.


iOSTabBar.CaptionAt

CaptionAt(index As Integer) As String

Gets or 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

iOS projects on the iOS operating system.

See also

Object parent class; iOSLayout, MobileScreen, iOSTabContent