How to create toolbars similar to those specified in Keynote?

Here is a screenshot of the main entry on the ipad:

alt text http://scottyallen.com/random/IMG_0009.PNG

The toolbar is rather flat - it does not have a vertical gradient, as the built-in toolbar styles do. I played with different styles, a translucent flag and color shades, and could not reproduce it.

How do they do it? How do I implement it?

+6
objective-c iphone ipad
source share
1 answer

I think you are talking about the UIToolbar top, not the toolbar at the bottom.

Changing the appearance of a UINavigationBar or UIToolbar very simple, you can just use the image instead of the calculated tintColor and the default gradient.

To do this, you need to subclass (or make a category) UINavigationBar or UIToolbar and overwrite the drawRect: method, for example:

 - (void)drawRect:(CGRect)rect { UIImage *image = [UIImage imageNamed:@"toolbarBackground.png"]; [image drawInRect:rect]; } 

This image then drawn in the exact rect UINavigationBar or UIToolbar , functioning as a background image.

+2
source share

All Articles