Plain Text on iOS Toolbar

I can’t work out whether it’s possible in Xojo to have plain text on an iOS Toolbar, like the way Mail has centred text in its toolbar that says “Checking for Mail…” or “Updated Just Now”. I can put a button there but I don’t want my text clickable; I want just plain text as status.

Has anyone worked out whether this is possible?

This should be possible with initWithCustomView and passing a UILabel/iOSLabel as the view. Something along the lines of:

[code]declare Function NSClassFromString lib “Foundation” (clsName as CFStringRef) as Ptr
Declare Function initWithCustomView lib “UIKit” selector “initWithCustomView:” (obj_id as ptr, view as ptr) as ptr
declare Function alloc lib “Foundation” selector “alloc” (clsRef as ptr) as ptr
dim lbl as new iOSLabel
lbl.Text = “This is a Label”
declare sub setFrame lib “UIKit” selector “setFrame:” (obj_id as ptr, frame as CGRect)

dim frame as CGRect
frame.x = 0
frame.y = 0
frame.w = 100
frame.h = 20

setFrame(lbl.Handle,frame)
dim item as ptr = initWithCustomView(alloc(NSClassFromString(“UIBarButtonItem”)), lbl.Handle)
dim button as iOSToolButton = iOSToolButton.NewFromHandle(item)

Toolbar.Add button[/code]
However a quick test is showing that NewFromHandle is returning nil on a valid instance… I will have to do some more testing tomorrow as it is already very late here.

Thanks Jason!