iOS 5 SDK 以不同方式对待 UIView
我的应用程序曾经在 xCode 4.0.2 中完美编译,但现在不再使用新 SDK 在 xCode 4.2 中正确编译。
我的模态视图的工作方式非常不同,某些状态未被检测到,或者其他解雇不起作用。例如,这用于消除 2 个堆叠的模态视图:
if(self.parentViewController.parentViewController)
[self.parentViewController.parentViewController dismissModalViewControllerAnimated:YES];
else
[self dismissModalViewControllerAnimated:YES];
现在这只是消除第一个视图...
我一直在寻找有关这些更改的文档,但没有找到任何文档。主要应用程序委托的工作方式似乎也有所不同。
非常感谢帮助。
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.
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.
Help greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
iOS 5 中有一个名为
presentingViewController
的新属性。新的容器视图控制器 API 改变了parentViewController
的含义,因此它可能并不总是在您认为的时候设置。这就是presentingViewController
现在的用途。There is a new property in iOS 5 named
presentingViewController
. The meaning ofparentViewController
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 whatpresentingViewController
is now for.