开发者

presentModalViewController problem - iphone sdk

I am using custom tabbar without the tabbar controller. When I try to add the viewController using

[self presentModalViewController:controller animated:YES];

edit: changed to presentsModalViewController.

which is for MFMailComposeViewController it works fine but it also removes the tabbar when I dismiss it.

For solution I had to present the controller on appDelegate.viewController like:

[APPDELEGATE.navigationController presentModalViewCont开发者_JAVA技巧roller:controller animated:YES];

edit: changed to presentsModalViewController.

This works fine and don't remove the tabbar. But the issue is when the iphone get locked after getting idle and I try to present the controller using this:

[APPDELEGATE.navigationController presentModalViewController:controller animated:YES];

edit: changed to presentsModalViewController.

It does not work.

In debug mode the code is executing but it is not presenting the viewController.

Many Thanks.


if you copied the Code right then you use
[APPDELEGATE.viewController dismissModalViewControllerAnimated:YES];
instead of
[APPDELEGATE.viewController presentsModalViewController:YOURVIEWController Animated:YES]; on the second call


I have fixed it myself. The problem was I was reallocating the navigation controller in the

- (void)applicationDidBecomeActive:(UIApplication *)application

Thanks.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜