iOS Question Disabling Toolbar buttons and Fontawesome

keirS

Well-Known Member
Licensed User
Longtime User
How do I handle disabling a ToolBar button when using Fontawesome? When I disable the button the icon changes to a question mark.
 

keirS

Well-Known Member
Licensed User
Longtime User
Project file attached: This is with the button disabled using the designer:


With it enabled:

 

Attachments

  • buttontest.zip
    110 KB · Views: 197
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Add this code to AppStart:
B4X:
For Each b As BarButton In Page1.ToolbarButtons
   Dim no As NativeObject = b
   Dim text As NativeObject = no.RunMethod("titleTextAttributesForState:", Array(0))
   If text.IsInitialized Then
       no.RunMethod("setTitleTextAttributes:forState:", Array(text, 0x2))
   End If
Next

It will be fixed in the next update.
 
Last edited:
Upvote 0
Top