I am trying to animate UIView using UIView.transition with [.transitionCurlUp] as argument option. However, the corners are still shown as invisible elements that the shadow falls on:
https://ibb.co/q9B34Sy
https://ibb.co/hfLk8vQ
https://ibb.co/7VzgVyj
@IBOutlet weak var buttonToBeCurled: UIView! {
didSet {
let tap = UITapGestureRecognizer(target: self, action: #selector(curlTappedView))
buttonToBeCurled.addGestureRecognizer(tap)
buttonToBeCurled.layer.cornerRadius = 35
buttonToBeCurled.backgroundColor = UIColor.purple
}
}
@objc func curlTappedView(_ gesture: UITapGestureRecognizer) {
let tappedView = gesture.view!
UIView.transition(with: tappedView, duration: 3.0, options: [.transitionCurlUp], animations: {
})
}
}
Is there something about the way animation works while curling the uiview?