Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 7 - UIPopoverController : deprecated arrows?

Tags:

ios

uikit

I'm adapting my app to iOS 7 and while I was reading the documentation, I read this line, under popoverArrowDirection at this link:

"(Deprecated. Popovers do not use arrows in iOS 7 and later.)"

This is weird, since my popover seems to still have arrows in iOS 7. Am I just understanding this the wrong way?

like image 851
airpaulg Avatar asked Oct 08 '13 17:10

airpaulg


1 Answers

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.

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;

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 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.

like image 185
Brian Nickel Avatar answered Nov 12 '22 17:11

Brian Nickel