Chapter 21: Challenge Bug?

The “Show More”/“Show Less” button animation is not working properly.

To make it work we have to make the following changes:

Replace this line of code:


with this:


and this line of code:

toggleHeightAnimator.continueAnimation(withTimingParameters: nil, durationFactor: 1.0)

with this:


The changes above produce the exact same results and additionally eliminate the bug.

So, what is the point in using pauseAnimation and continueAnimation?

@icanzilb Do you have any feedback regarding this? Thank you - much appreciated! :]