UIView.transition by setting .isHidden property broken in iOS 12?

In the animation transitions playground for the beginning iOS animation course, it appears that in iOS 12 you can’t use the .isHidden property like this:

UIView.transition(
      with: beachball,
      duration: duration,
      options: beachballOptions,
      animations: {
        self.beachball.isHidden = shouldHide
      },
      completion: nil)

So how does one go about performing these types of transitions now?

hi @avianate,
have you tried using .alpha = 0 instead and in the completions closure set the isHidden to true or false

cheers,

Jayant

This topic was automatically closed after 166 days. New replies are no longer allowed.