Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
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.
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?
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!
OK, I'm closing the bug report then.