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.
There seems to be a type mismatch for the MonoTouch.UIKit.NSLayoutConstraint.Priority property.
It is supposed to be one of the enum UILayoutPriority. But the compiler is requiring me to explicitly
cast to float if like this...
MyConstraint.Priority = (float)UILayoutPriority.Required;
Is this correct? Feels like it should not require the cast.
I am using the latest stable release of Xamarin Studio (4.0.1). It reports that I am using Xamarin.iOS version 18.104.22.168
Oddity still here in 4.0.2
You're right, it is an oddity.
> Is this correct?
Yes, this happens because Objective-C allows floats as a valid enum type while this is not possible on .NET. It's not common but UILayoutPriority  is one of the few cases.
UILayoutPriorityRequired = 1000,
UILayoutPriorityDefaultHigh = 750,
UILayoutPriorityDefaultLow = 250,
UILayoutPriorityFittingSizeLevel = 50,
typedef float UILayoutPriority;