xamarin / xamarin-macios

.NET for iOS, Mac Catalyst, macOS, and tvOS provide open-source bindings of the Apple SDKs for use with .NET managed languages such as C#
Other
2.48k stars 514 forks source link

UISegmentedControl binding error #6357

Closed vsfeedback closed 2 years ago

vsfeedback commented 5 years ago

The binding for UISegmentedControl has...

[BindingImpl(BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
[Export("dividerImageForLeftSegmentState:rightSegmentState:barMetrics:")]
public virtual UIImage DividerImageForLeftSegmentStaterightSegmentStatebarMetrics(UIControlState leftState, UIControlState rightState, UIBarMetrics barMetrics);

which, for consistency, should be GetDividerImage(...) rather than DividerImageForLeftSegmentStaterightSegmentStatebarMetrics(...)

I realize it's a breaking change, but I believe it's also one where the compiler error would be instantly recognizable and immediately understood by anyone who has overridden or needed to make use of this call.

This issue has been moved from https://developercommunity.visualstudio.com/content/problem/538692/uisegmentedcontrol-binding-error.html VSTS ticketId: 850102

dalexsoto commented 5 years ago

Thank you for the feedback, as you mention this is a breaking change unfortunately we cannot make the change right away but it will be fixed in the future when we are able to break the API.

Thanks again!

rolfbjarne commented 5 years ago

@dalexsoto this method is not in a protocol, so we can at least implement the better named version and obsolete the old one already.