开发者

How to show and dismiss ViewControllers without the user seeing

I have several view which I show and dismiss, but it is visible when a view moves onto screen and is dismissed from the screen.

开发者_开发问答

How do I set it to just appear without any animation?

I have tries the animation:NO, it doesnt change anything.

Are there special calls for different animation types?


If you are wanting to present a view controller modally (ie, without using a UINavigationController) you would use the following:

-(IBAction)myButtonThatDisplaysOtherView:(id)sender {
    //where myOtherViewController is a UIViewController...
    [self presentModalViewController:myOtherViewController animated:NO];
    ...
}

To remove from the screen use the following:

[self dismissModalViewControllerAnimated:NO];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜