Open bottom-up slide view on iPhone

I’m making an application for the iPhone (which works in landscape mode) (OS 3.0), and I want a slide effect to appear when I touch the button on the toolbar (similar to the effect when you touch Bookmarks in the Mobile Safari toolbar) from bottom to top at the top of the screen.The view is in the same XIB file as the button.

How can i do this?

Thanks in advance.

+6
objective-c iphone slide
source share
2 answers
[self.tabBarController presentModalViewController:yourSlideController animated:YES]; 
+7
source share

If you are asking how to tweak the animation here, you might need a snippet. Suppose the view "myView" is already added as a subview to the current view.

 [myView setFrame:CGRectMake(0, 480, 320, 480)]; [myView setBounds:CGRectMake(0, 0, 320, 480)]; [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:1.0]; [UIView setAnimationDelegate:self]; [myView setFrame:CGRectMake(0, 0, 320, 480)]; [UIView commitAnimations]; 

Important numbers are the y positions in the setFrame rectangle (480, then 0), which moves it from screen to screen.

+10
source share

All Articles