Dropbox无法关闭模态视图控制器 [英] Dropbox could not dismiss modal view controller

查看:136
本文介绍了Dropbox无法关闭模态视图控制器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在我的应用程序中集成了Dropbox,输入用户名和密码后,当我尝试关闭Dropbox视图控制器时,它没有被解雇。我正在使用xcode4.2和ios sdk5。请帮我解决这个问题。

I have integrated dropbox in my application,After entering the username and password,when i try to dismiss the dropbox view controller it is not dismissing. i am using xcode4.2 with ios sdk5.Please help me to fix this issue.

推荐答案

在ios5中你必须使用presentViewController而不是parentViewController。

in ios5 you have to use presentingViewController instead of parentViewController.

例如:

if (self.parentViewController) {
    [self.parentViewController dismissModalViewControllerAnimated:YES];
} else if ([self respondsToSelector:@selector(presentingViewController)] && self.presentingViewController) {
    [self.presentingViewController dismissModalViewControllerAnimated:YES];
}

这篇关于Dropbox无法关闭模态视图控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆