iOS Toolbar Background Image

You must Login before you can answer or comment on any questions.

Is it possible to have a background image for a toolbar in iOS, specifically on the iPad?

I know that there is a doc that shows a backgroundImage property, but I can't manage to make it work.

Searching around, I have found other people having the same problem. Is this a known bug?

My code

var toolbar = Titanium.UI.iOS.createToolbar({
    items:[send, flexSpace, camera, flexSpace, cancel],
    top:0,
    backgroundImage: 'app/images/toolbar-bg.png',
    backgroundRepeat: true,
    borderTop:false,
    borderBottom:true
}); 
mainWindow.add(toolbar);
The toolbar shows up but the background is the standard steel-gray color.

— asked 1 year ago by Aaron Francis
1 Comment
  • Hi Aaron, i also checked and found it not working. may be you can log a JIRA Ticket for that with your sample code if not already there.

    — commented 8 months ago by Ashish Nigam

3 Answers

How about add property { barColor: 'transparent' }

The background Image property does not work with toolbar and even in docs it says that it is just for views. like I have shown in the pic

![alt text](http://oi50.tinypic.com/20gfkw0.jpg "Title")

@Sid, that doesn't mean it is only for views, that means it inherits it from the view class. The three properties above backgroundImage (in your image) say "view" but still work with the toolbar.

Your Answer

Think you can help? Login to answer this question!