TTMSFMXNativeUITabBarController
Usage
The TMSFMXNativeUITabBarController
displays tabs at the bottom of the window for selecting
between the different modes and for displaying the views for that mode.
Published Properties
Property name | Description |
---|---|
Badge (TabBarItem level) | A Badge displayed per tab item in the TabBar. |
Bitmap (TabBarItem level) | An image display per tab item in the TabBar. |
Color (TabBarItem level) | The background color of the tab item in the TabBar. |
Enabled (TabBarItem level) | Enables / disables the view of a tab item in the TabBar. |
ItemIndex (TabBarItem level) | The current item index of the tab inside the TabBar. |
SelectedItem (TabBarController level) | The current selected item in the TabBar. |
SelectedItemIndex (TabBarController level) | The current selected item index in the TabBar. |
TabEnabled (TabBarItem level) | Enables / disables a tab item in the TabBar. |
Text (TabBarItem level) | The text display on a tab in the TabBar. |
Public Properties
Property name | Description |
---|---|
TabBarController | Returns a reference to the native iOS UITabBarController . |
ViewController (TabBarItem level) | Returns a reference to the native iOS UIViewController that is used for each tab inside the TabBarController. |
Events
Property name | Description |
---|---|
OnItemChanged | Event called when a new tab item is selected and the OnItemWillChange event has returned an AllowChange true. |
OnItemWillChange | Event called when a different tab will be selected, through this event an AllowChange parameter can be used to optionally disable switching to a different tab item. The AllowChange parameter is true by default. |
Adding tabs
When dropping a TMSFMXNativeUITabBarController
instance on the form (TabBar), it will look
similar to any other native iOS control in the TMS iCL package. When right-clicking on the TabBar, you will notice a popup menu with some options to add, remove items and jump to the previous or next page.
Clicking on New Item
, adds a new TMSFMXNativeUITabBarItem
instance to the form
(TabBarItem), which can only be used inside the TabBar. In the sample below, 2
TabBarItems have been added, and the first TabBarItem is selected.
Clicking on the Tabs below will not change the page, they are currently only an indicator since FireMonkey does not handle designtime messages.
Designtime handling
As mentioned in “Adding tabs”
, designtime selection and modifications needs to be done through
right-clicking the TabBarItem or the TabBar and choosing one of the options. You can also switch TabBarItems by selecting a different item in the SelectedItem
property list:
Alternatively you can also set the SelectedItemIndex
property that will automatically set
the SelectedItem
or vice versa.
Each TabBarItem inherits from TMSFMXNativeUIView
and adds some properties that are
used inside a TabBarItem. As it inherits from this class it adds full support to add other TMS FMX Native iOS controls.