Make the DetailView appearing animation on iPad a bit cooler

Well, thanks to the useful topics here in the forum I’ve found out how to make the DetailView appear animated on the iPad. But as book says, “Apple is the king of animations”, and the exercise itself offer us to make the view show up using a cool animation.
So I tried at least add some rotation and scaling to that:

popupView.isHidden = false
popupView.alpha = 0
popupView.transform.rotated(by: .pi).scaledBy(x: 0.1, y: 0.1) //doesn't work here
UIView.animate(withDuration: 0.5, animations: {
  self.popupView.alpha = 1
  self.popupView.transform.rotated(by: 0).scaledBy(x: 1, y: 1) //doesn't work here
}, completion: { (finised) in })

but it didn’t work. I tried to write the transform statements separately for rotated and scaled, didn’t help as well. Tried to comment out alpha line, but in that case there is no animation at all.
All this didn’t work even when I tried to create the keyframe animation groups:

popupView.isHidden = false
popupView.alpha = 0
popupView.transform.rotated(by: .pi).scaledBy(x: 0.1, y: 0.1)
UIView.animateKeyframes(withDuration: 0.5, delay: 0,
                             options: .calculationModeCubic,
                          animations: {
  UIView.addKeyframe(withRelativeStartTime: 0.0, 
    relativeDuration: 0.334, animations: {
      self.popupView.alpha = 0.333
      self.popupView.transform.rotated(by: -(.pi/8))
  })
  UIView.addKeyframe(withRelativeStartTime: 0.334, 
    relativeDuration: 0.333, animations: {
      self.popupView.alpha = 0.667
      self.popupView.transform.rotated(by: .pi/10)
  })
  UIView.addKeyframe(withRelativeStartTime: 0.667, 
    relativeDuration: 0.333, animations: {
      self.popupView.alpha = 1
      self.popupView.transform.rotated(by: 0)
  })
})

So, as always, I would be grateful if somebody could explain how to make the animation really cool, as exercise requires. :wink:




UPD: Whoops, by the way, the solution they gave there in the topic brakes the view from appearing on the iPhones, so the best way to make it harmless is the solution which is given by kikinbahk here:

UIView.transition(with: view, duration: 0.5, 
               options: .transitionCrossDissolve, 
            animations: { self.popupView.isHidden = false }, 
            completion: {_ in})

But… well… I think you will agree that it’s still much far from what we could call the “cool animation”…
So I still hope that someone can give some advice on how to add some additional juice to that animation.