iphone - Is it possible to use Core Animation to fade out a UIBarButtonItem? -
I'm curious, is it possible to give some kind of core animation to" fade out "of a UIBarButtonItem? I have a table view that I represent with two different data sources. Once a particular data source is triggered, I do not have the current UIToolBar options and want to fade in the new one.
Thank you for pointing me in the right direction.
You are really using a UIToolbar (note lower case" B ") and not a UINavigationBar, there is a very easy way to change the button and the transition does not automatically happen without leaving the core animation.
If you are using the interface builder, you will need a reference to the toolbar in your code. Create an IBOutlet property and toolbar to do it in IB:
@property (nonatomic, retaining) IBOutlet UIToolbar * toolbar; This will allow you to refer to UIToolbar as self.toolbar. Then, create your new button and add them to an NSArray and pass it to - [Method Uitoolbar setItems: Animated]:
UIBarButtonItem * newItem = [[[UIBarButtonItem alloc ] InitWithBarButtonSystemItem: UIBarButtonSystemItemDone Target: Self Operation: @selector (handleTap :)] autorelease]; NSArray * newButtons = [NSArray arrayWithObjects: newItem, zero]; [Self. Togglebar set item: Newbutton animated: yes];
Comments
Post a Comment