maui
maui copied to clipboard
[iOS] Implement IsEnabled property on Editor
Description of Change
Implement IsEnabled property on iOS Editor.
Issues Fixed
Fixes #6700
Why is this an iOS specific? I am wondering if we should rather update the extension method to check this type to not only remove the API break but also because it will be surprising. What if the extension is being called from the base UIView?
What if the extension is being called from the base UIView?
Actually, I have the same doubt, is the MAUI control ContentView.Enabled property working on iOS?
Why is this an iOS specific? I am wondering if we should rather update the extension method to check this type to not only remove the API break but also because it will be surprising. What if the extension is being called from the base UIView?
On all platforms we manage the IsEnabled property at the ViewHandler level in the MapIsEnabled method, then on each platform managed by the UpdateIsEnabled method of ViewExtensions.
However, in this specific case in Xamarin.Forms it was managed in the Renderer with some workaround https://github.com/xamarin/Xamarin.Forms/blob/5.0.0/Xamarin.Forms.Platform.Android/Renderers/EditorRenderer.cs#L59
In .NET MAUI we manage it at the Handler level to modify the Editable and Selectable properties of the UITextView. The extension method expects a control of type UITextView not UIView.