iOS Question Tbc TabBarControl , Frame

MList

Member
Licensed User
Is there a posibility to make a frame around the TabbarControl,
or around the TabBarControl Items ?
Thanks a lot
Marion
 

Semen Matusovskiy

Well-Known Member
Licensed User
Lines from all sides looks enough strange on iPhone X +.
Typically there is a top line only.

To make this line you can retrieve tabBar and to set shadowImage property.
Looks simple, but you need to creare a image (not very comfortable).

IMO, more simple is to add a subview. For example:
B4X:
   Dim noTabControl As NativeObject = TabControl
    Dim noTabBar As NativeObject = noTabControl.GetField ("tabBar")
    Dim View As View = noTabBar    
    Dim Panel As Panel
    Panel.Initialize ("")
    Panel.Width = View.Width
    Panel.Height = 1
    Panel.Color = Colors.Red    
    noTabBar.RunMethod ("addSubview:", Array (Panel))
 

MList

Member
Licensed User
Thanks a lot.
So now i have got a line over the tab bar, that looks ok👍
Is there a possibility to get a frame around each of the tbc page items?
 

Semen Matusovskiy

Well-Known Member
Licensed User
TabBarItems are subviews of tabBar. For example, after first two lines of my sample add following
B4X:
    Dim l As List = noTabBar.GetField ("subviews")
    For Each view As View In l
        view.SetBorder (1, Colors.Green, 0)
    Next
You will see green borders, but I don't think that this is nice. Do you have a picture with desired design ?
 

Semen Matusovskiy

Well-Known Member
Licensed User
Specify third parameter in view.SetBorder.

But more important to check how it looks in modern iPhones with rounded corners
 
Top