Completed
Last Updated: 23 Oct 2019 12:26 by ADMIN
Release R3 2019 SP
n/a
Created on: 24 Sep 2019 11:49
Category: SegmentedControl
Type: Bug Report
6
SegmentedControl: [iOS] SelectedSegmentBackgroundColor is not applied on iOS 13
starting from iOS 13 (released few days ago as you know) the SelectedSegmentBackgroundColor in RadSegmentedControl is always white.
5 comments
Chris Windram
Posted on: 21 Oct 2019 16:00
Movilidad's renderer solved the problem for me. Thanks Movilidad!
ADMIN
Didi
Posted on: 11 Oct 2019 07:54

Hi guys,

Update regarding the issue: Currently the developer team is looking into it. 

Thank you Javier for the provided workaround. This approach works in cases when the latest versions of VS 2019 and XCode 11 are used

Regards,
Didi
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
movilidad
Posted on: 11 Oct 2019 05:41

I have fixex with SegmentedControlRenderer.

 

using System.ComponentModel;
    using Telerik.XamarinForms.Input;
    using Telerik.XamarinForms.InputRenderer.iOS;
    using UIKit;
    using Xamarin.Forms;
    using Xamarin.Forms.Platform.iOS;

public class CustomSegmentedControlRenderer : SegmentedControlRenderer
    {
        protected override void OnElementChanged(ElementChangedEventArgs<RadSegmentedControl> e)
        {
            base.OnElementChanged(e);

            this.SetSelectedSegmentedColor(this.Element.SelectedSegmentBackgroundColor);
        }

        protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            base.OnElementPropertyChanged(sender, e);

            if (e.PropertyName.Equals(RadSegmentedControl.SelectedSegmentBackgroundColorProperty.PropertyName))
                this.SetSelectedSegmentedColor(this.Element.SelectedSegmentTextColor);
        }

        private void SetSelectedSegmentedColor(Color xColor)
        {
            if (UIDevice.CurrentDevice.CheckSystemVersion(13, 0))
            {
                if (this.Control is UISegmentedControl uISegmented && xColor.ToUIColor() is UIColor color)
                {
                    uISegmented.SelectedSegmentTintColor = color;
                }
            }
        }
    }

David
Posted on: 10 Oct 2019 18:23

Has Telerik indicated if this is going to be fixed and if so when?

I was looking at using the segmented control to replace something else I'm using and I see the problem you describe in iOS 13.

 

Thanks

movilidad
Posted on: 08 Oct 2019 10:05

In ios 12 or minor working ok. In ios 13 not show (alwais white).