开发者

How to slide UIViewcontroller on a button even from bottom to top like an action sheet?

开发者 https://www.devze.com 2023-04-11 22:37 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消