I am trying to use the trash can animation in an iPhone application I am building. I know the feature I need help with is a private API but the app will be in-house.
According to the iPhoneDevWiki at the toolbar page you can activate the trash can opening animation using [UIToolbar animateToolbarItemIndex:duration:target:didFinishSelector:];.
After countless hours trying to use this method I could not get it to work. I have changed it so far to the following: [toolbar animateToolbarItemIndex:1 duration:1.0 target:self didFinishSelector:@selector(done:)];.
toolbar is the name of the UIToolbar I created programically using CGRectMake.
My button image for the trash can is 1, since it is the second button.
I have tried putting self and nil in target but it doesn't work.
didFinishSelector just links to -(void)done:(id)sender;.
If I change the animateToolbarItemIndex to something that does not exist, the console says that it does not exist. Any ideas to what I have wrong?