SfCircularProgressBar not updating circle correctly

I have implemented SfCircularProgressBar and the circle progress is not synced with the progress value, I'm displaying the progress value in a UILabel and it reflects the value correctly. I attached a screenshot. Here's the code:


ProgressView = new SfCircularProgressBar()

{

TranslatesAutoresizingMaskIntoConstraints = false,

Hidden = true,

BackgroundColor = UIColor.Clear,

Minimum = 0,

Maximum = 100,

};

ProgressView.ProgressColor = App_Settings.OrangeColor;

this.AddSubview(ProgressView);

ProgressView.CenterYAnchor.ConstraintEqualTo(this.CenterYAnchor, 0).Active = true;

ProgressView.CenterXAnchor.ConstraintEqualTo(this.CenterXAnchor, 0).Active = true;

ProgressView.WidthAnchor.ConstraintEqualTo(80).Active = true; ProgressView.HeightAnchor.ConstraintEqualTo(80).Active = true;



// progress while downloading UIimage

InvokeOnMainThread(() =>

{

ProgressView.Hidden = false;

var progress = 100 * (decimal.Divide(result.Current, result.Total));

ProgressView.Progress = (double)progress;

SetCustomContentProgress((int)progress); // display progress in uilabel


});


Thanks,






2 Replies

BJ Benin JayaDhas Syncfusion Team April 21, 2022 01:51 PM UTC

Greetings from Syncfusion.    

  

We have created a simple sample to reproduce the reported issue with the provided code snippet but the behavior is working as expected. Please find the sample in the below link for your reference.  

 

Sample link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/NativeIOS-1369256960

   

Kindly share the following details to analyze more on this issue and assist you with the better solution   

1.       Simple sample/ modify the above sample to reproduce the issue.  

2.      SfProgressbar version  

3.       Replication procedure to reproduce the issue.  



AH ahmed April 21, 2022 02:21 PM UTC

I found the issue, I missed this line:

 ProgressView.AnimationDuration = 1;


Thank you so much for your help and quick response. Appreciated!





Loader.
Up arrow icon