iOS 7 - UIPopoverController:不推荐使用的箭头? [英] iOS 7 - UIPopoverController : deprecated arrows?
问题描述
我正在将我的应用程序调整到 iOS 7,在阅读文档时,我阅读了这一行,位于 此链接:
I'm adapting my app to iOS 7 and while I was reading the documentation, I read this line, under popoverArrowDirection at this link:
(已弃用.弹出窗口在 iOS 7 及更高版本中不使用箭头.)"
"(Deprecated. Popovers do not use arrows in iOS 7 and later.)"
这很奇怪,因为我的弹出窗口在 iOS 7 中似乎仍然有箭头.我是不是理解错了?
This is weird, since my popover seems to still have arrows in iOS 7. Am I just understanding this the wrong way?
推荐答案
这看起来像是文档中的错误.箭头可能是设计师的砧板,但在可用性测试中又做出了决定.
This looks like a bug in the documentation. Arrows were probably on the chopping block by designers but the decision was reverted in usability testing.
如果您查看 UIPopoverController.h
,您不会看到任何弃用属性(例如 NS_AVAILABLE_IOS
或 NS_DEPRECATED_IOS
):
If you look in UIPopoverController.h
, you don't see any deprecation attributes (e.g. NS_AVAILABLE_IOS
or NS_DEPRECATED_IOS
):
/* Returns the direction the arrow is pointing on a presented popover. Before
presentation, this returns UIPopoverArrowDirectionUnknown.
*/
@property (nonatomic, readonly) UIPopoverArrowDirection popoverArrowDirection;
将此与 -[NSString sizeWithFont:constrainedToSize:]
对比:
- (CGSize)sizeWithFont:(UIFont *)font constrainedToSize:(CGSize)size NS_DEPRECATED_IOS(2_0, 7_0, "Use -boundingRectWithSize:options:attributes:context:");
这些属性很重要,因为它们会生成编译器警告和错误.它们也由实际编写 UI 代码的人员维护.
These attributes are important because they generated the compiler warnings and errors. They are also maintained by the people who actually code the UI.
将缺乏属性与您看到的行为直接与文档相矛盾的事实相结合,您真的不应该担心.如果它真的困扰您,可以提交错误报告.
Combining the lack of attributes with the fact that the behavior you see directly contradicts the documentation, you really shouldn't worry about it. If it really bothers you, can file a bug report.
这篇关于iOS 7 - UIPopoverController:不推荐使用的箭头?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!