UIToolbar

From iPhone Development Wiki
Jump to: navigation, search
The toolbar in MobileSafari.

UIToolbar is a view containing buttons or custom views represented by UIBarButtonItems. It is comparable with toolbars in standard GUI.

Contents

Animating the trash can icon

Signature -(void)animateToolbarItemIndex:(NSUInteger)index duration:(NSTimeInterval)duration target:(id)target didFinishSelector:(SEL)selector;
Available in 3.0 –

You can use the -[UIToolbar animateToolbarItemIndex:duration:target:didFinishSelector:] method to animate the trash can icon (UIBarButtonSystemItemTrash). The first call will open the trash can, and the second call closes it.

User configuration

Signature -(void)beginCustomizingItems:(NSArray*)items
Available in 2.0 –

Calling this method will make a configuration screen similar to that of UITabBar.

Rounded corners

Signature @property(assign,nonatomic) BOOL hasRoundedCorners;
Available in 3.0 – 3.1

Setting this property to YES will make the lower part of the toolbar appear rounded.

See also

References