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.
In the current binding:
var f = (UIGraphicsImageRendererFormat) UIGraphicsImageRendererFormat.DefaultFormat;
throws an InvalidCastException but in Swift:
var s = UIGraphicsImageRendererFormat.default()
I think the subtypes of UIGraphicsRendererFormat need to 'new' the DefaultFormat property and have it return an instance of the subtype.
It looks like it. It's not clear, at least I did not find documentation beside the headers, but UIGraphicsRenderer is abstract
> An abstract base class for creating graphics renderers. Do not use this class directly.
> NS_CLASS_AVAILABLE_IOS(10_0) @interface UIGraphicsRenderer : NSObject
and I suspect its sibling types, UIGraphicsRendererFormat and UIGraphicsRendererContext, should also be abstract.
Not sure enough about UIGraphicsRendererFormat and UIGraphicsRendererContext as they seems to work... but UIGraphicsRenderer was made abstract.
Both subclasses of UIGraphicsRendererFormat also redefine (new) the static property so they return `instancetype`
Fixed in xamarin-macios/xcode8 f63ecd7a21161bae43e162114cbd6e14dda8fc4e
Verified with XI 220.127.116.11