Bug 19700 - UIPopoverBackgroundView WantsDefaultContentAppearance static property is never called
Summary: UIPopoverBackgroundView WantsDefaultContentAppearance static property is neve...
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 7.2.2
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL: http://stackoverflow.com/questions/21...
Depends on:
Reported: 2014-05-12 18:42 UTC by jesse.attas
Modified: 2014-05-13 15:01 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Project that reproduces the bug (12.63 KB, application/zip)
2014-05-12 18:42 UTC, jesse.attas

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description jesse.attas 2014-05-12 18:42:19 UTC
Created attachment 6786 [details]
Project that reproduces the bug

As described in the linked stack overflow post, if I try to provide my own implementation for WantsDefaultContentAppearance in my UIPopoverBackgroundView class, my implementation is never called. This seems to be an issue with overriding a static property, even though I am marking my version as "new" and as [Export("wantsDefaultContentAppearance")].

See the PopoverBackgroundView class of the attached project.
Comment 1 Rolf Bjarne Kvinge [MSFT] 2014-05-13 06:24:59 UTC
If I run the test case in an iOS 6.1 simulator, the property is called (but as far as I can see the drop shadow is still there).

I also tried native debugging with lldb, and putting a breakpoint on all the 'wantsDefaultContentAppearance' methods (the test app's and the ones inside iOS) does not hit at all, so it looks like iOS 7+ just doesn't call the selector.

At this point I'm inclined to think it's not a problem in Xamarin.iOS (since the property is called in the iOS 6.1 simulator), but instead a problem with the test case. Do you have a similar Xcode project that works correctly?
Comment 2 jesse.attas 2014-05-13 14:39:42 UTC
Looks like you're right: the property isn't called in an iOS 7 objective-C app either. There are posts on Apple's devforums complaining about this, but no response from Apple.

Thanks for your quick investigation!
Comment 3 Rolf Bjarne Kvinge [MSFT] 2014-05-13 15:01:52 UTC
OK, I'm closing the bug report then.