IOS 7 - UIPopoverController: obsolete arrows?

I am adapting my application to iOS 7, and while I was reading the documentation, I was reading this line under the popoverArrowDirection heading at this link :

"(Deprecated. Travel companions don't use arrows in iOS 7 and later.)

This is strange, since my popover seems to still have arrows in iOS 7. Do I just get it wrong?

+6
source share
1 answer

It looks like a documentation error. The shooters were probably designers at the chopping block, but the decision was reversed in usability testing.

If you look in UIPopoverController.h , you will not 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; 

Contrast this with -[NSString sizeWithFont:constrainedToSize:] :

 - (CGSize)sizeWithFont:(UIFont *)font constrainedToSize:(CGSize)size NS_DEPRECATED_IOS(2_0, 7_0, "Use -boundingRectWithSize:options:attributes:context:"); 

These attributes are important because they generate warnings and compiler errors. They are also supported by people who actually code the user interface.

Combining the lack of attributes with the fact that the behavior you see is directly contrary to the documentation, you really should not worry about that. If this really bothers you, report a bug report .

+4
source

Source: https://habr.com/ru/post/955513/


All Articles