Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

roeik

macrumors member
Original poster
Dec 25, 2008
80
0
HI Guys,

I have a view with a UIToolBar at the bottom. I don't have enough space to put all the components that I want on it, so I want to create a button that when you press on it the toolbar moves up and displays another toolbar under it.

I set up the toolbars on top of each other in interface builder but can anyone help me how I can go about making the top toolbar animating a few pixels up?

This is kind of similar to advertisements pop up.

Thanks,

Roei
 
I don't have enough space to put all the components that I want on it, so I want to create a button that when you press on it the toolbar moves up and displays another toolbar under it.
I would suggest following the Apple recommended approach here and have the last tab be More and it brings up a tableView with further choices.
 
I don't mean a tab bar, I mean a tool bar. Like in the mail application.
 
I don't mean a tab bar, I mean a tool bar. Like in the mail application.
Ah, my apologies. Musta misread that. Anyways, what would you think about having one of the toolbar choices pop up a list of buttons, similar to Mail's reply action? That also seems more common. But if you're determined to have an extra toolbar appear then, yeah, look into rarindeed's advice and check out the UIView animation methods.
 
Thanks. It works.

For other people, here is the code I used:

Code:
[UIView beginAnimations:nil context: @"statToolBar"]; // Tell UIView we’re 
		[UIView setAnimationCurve: UIViewAnimationCurveEaseInOut ];
		[UIView setAnimationDuration: 0.4f];

//Set up the new position of the frame of the view

[UIView commitAnimations];
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.