开发者

how to flip from one view to another view in iphone sdk

I wan't to flip from one view controller to another for that i used following coding on button click

-(void)ClicOnLogout {
    LogOutViewController *logOut=[[LogOutViewController alloc]initwithnName:str];  
    logOut.modalTran开发者_高级运维sitionStyle = UIModalTransitionStyleFlipHorizontal;  

    [self presentModalViewController:logOut animated:YES];  
}

but when i m in logout view controller there is one button but it won't work so can any one give me the proper solution for it.

Thanx...


You should read that Apple documentation article on Modal View Controllers which explains everything you are asking there. Basically what you need to do on your logout view is to call :

[self dismissModalViewControllerAnimated:YES];

By calling this, the back (left-to-right) flip animation will be done automatically :

UIModalTransitionStyleFlipHorizontal

When the view controller is presented, the current view initiates a horizontal 3D flip from right-to-left, resulting in the revealing of the new view as if it were on the back of the previous view. On dismissal, the flip occurs from left-to-right, returning to the original view.


You can call the popViewControllerAnimated method:

[self.navigationController popViewControllerAnimated:YES];

or you can assign it to push it onto the navigation controllers stack:

[self.navigationController pushViewController: viewController animated:YES];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜