Dropbox 无法关闭模态视图控制器

发布于 2024-12-16 12:16:17 字数 91 浏览 1 评论 0原文

我在我的应用程序中集成了保管箱,输入用户名和密码后,当我尝试关闭保管箱视图控制器时,它不会关闭。我正在使用 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

怀中猫帐中妖 2024-12-23 12:16:17

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

例如:

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

in ios5 you have to use presentingViewController instead of parentViewController.

e.g.:

if (self.parentViewController) {
    [self.parentViewController dismissModalViewControllerAnimated:YES];
} else if ([self respondsToSelector:@selector(presentingViewController)] && self.presentingViewController) {
    [self.presentingViewController dismissModalViewControllerAnimated:YES];
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文