Bug: Progress with Child

There is a parent progress that has a total unit count of 1000 units. A child progress was added with pending unit count 1000. When the child progress’ completed unit count is updated, then the fraction completed of the parent is updated, but the completed unit count is not.

Submitted as Apple Feedback FB9803982. The beautiful sample app can also be found on my RadarSamples repo.

Steps to Reproduce

  1. run the attached Sample App on iPhone Simulator
  2. Drag the slider slowly to the right. Notice that only the parent’s fraction completed changes.
  3. Continue dragging the slider to the right maximum. Notice that when you come to the right side of the slider the parent’s completed count is updated.
  4. Drag the slider a bit to the left. Again, only the parent’s fraction is updated.
  5. Drag the slider to the right maximum. The parent’s completed unit count is now double what it should be. In fact every time the child completes, 1000 is added to the parent’s completed unit count.

Expected Behavior

When adding a child progress with a pendingUnitCount value greater than 1, then the completedUnitCount should also be updated in tandem with the fractionCompleted value.

Actual Behavior

Only the fraction completed of the parent is updated. When the child reaches 100%, the pending value is added to the completed unit count. If the progress reverses for some reason, the completed unit count remains and when the child gets back to 100% the pending value is AGAIN added.

Originally published at Cocoanetics.

--

--

iOS Developer, Trainer, Coach, iOS Tech Journalist and Speaker Wannabe. This is the professional account, the personal is @OliverDrobnik (German)

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Cocoanetics 

iOS Developer, Trainer, Coach, iOS Tech Journalist and Speaker Wannabe. This is the professional account, the personal is @OliverDrobnik (German)