iOS 5 SDK以不同方式处理UIViews [英] iOS 5 SDK treating UIViews differently

查看:88
本文介绍了iOS 5 SDK以不同方式处理UIViews的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在xCode 4.0.2中完全正常编译的应用程序在xCode 4.2中使用新SDK无法正常编译。

My app which use to work perfectly being compiled in xCode 4.0.2 no longer works correcly compiled in xCode 4.2 with the new SDK.

我的模态视图正在运行非常不同,有些州没有被发现,或其他解雇不起作用。例如,这用于解散2个堆叠的模态视图:

My modal views are working very different, some states not being detected, or other dismissals not working. For example this use to work to dismiss 2 stacked modal views:

if(self.parentViewController.parentViewController)
        [self.parentViewController.parentViewController dismissModalViewControllerAnimated:YES];
else
    [self dismissModalViewControllerAnimated:YES];

现在这只是驳回了第一个视图......

Now this just dismisses the first view...

我一直在寻找有关这些变化的文档,但没有找到。主应用程序委托似乎也有不同的工作方式。

I've been looking for documentation on these changes but have found none. Primary app delegate seems to be working differently too.

非常感谢帮助。

推荐答案

iOS 5中有一个名为 presentsViewController 的新属性。使用新的容器视图控制器API, parentViewController 的含义发生了一些变化,所以当你认为它时,它可能并不总是被设置。那就是 presentsViewController 现在用于。

There is a new property in iOS 5 named presentingViewController. The meaning of parentViewController got changed a bit with the new container view controller API, so it may not always be set when you think it is. That's what presentingViewController is now for.

这篇关于iOS 5 SDK以不同方式处理UIViews的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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