How to slide UIViewcontroller on a button even from bottom to top like an action sheet?
I am making an iPhone application. I want to slide a view controller on a button event from bottom to top just like action sheet. Can anyone please suggest me some code or sample fo开发者_Python百科r this? Please help.
Use the following code to slide a UIView
from bottom to top:
myViewController *obj = [[myViewController alloc] init];
[self presentModalViewController:obj animated:YES];
and the code below to slide a UIView
from top to bottom, i.e., to dismiss the UIView
:
[self dismissModalViewControllerAnimated:YES];
UIModalTransitionStyleCoverVertical slides a view up from the bottom of the screen. On dismissal, the view slides back down.
精彩评论