iOS Question BarButton Icon

Emme Developer

Well-Known Member
Licensed User
Longtime User
Hi to all! I'm trying to add an info icon, but i have some issue.

Code: Copy
    Dim bb As BarButton
    bb.InitializeBitmap(LoadBitmap(File.DirAssets,"[email protected]"),"1")
    bb.Enabled = True
    bb.TintColor = 0xFFED7B53
    mpa.TopRightButtons = Array As Object(bb)

icon is 25 x 25 and this is result


upload_2017-7-25_16-23-33.png


Icon is not centered

Code: Copy
Dim bb As BarButton
    bb.InitializeText(Chr(0xE88F),1)
    bb.Enabled = True
    bb.TintColor = 0xFFED7B53
    bb.SetFont(Font.CreateMaterialIcons(32))
    mpa.TopRightButtons = Array As Object(bb)

upload_2017-7-25_16-25-2.png
 
Why aren't you adding the BarButton with the designer?

If I remember correctly the icon size should be 24 * 24.

You can use CSBuilder.VerticalAlign to fix the alignment.
Thanks Erel, i tried to add it using Designer, but i don't achieve what i want. But after follow your tutorial, i achieve right dimensions on icon using InitializeCustom and using a button
 
Upvote 0

Similar Threads

  • Article Article
iOS Code Snippet Barbutton events
Replies
0
Views
3K
  • Locked
  • Article Article
Replies
4
Views
23K
  • Article Article
iOS Tutorial BarButton icons
Replies
2
Views
15K
Replies
1
Views
4K
Back
Top