Can some help me with the syntax of the transitionWithView in swift. in objective-c I would use it like so:
[UIView transitionWithView:[ self view ] duration:0.325 options:UIViewAnimationOptionCurveEaseOut animations:
 ^{
     // do the transition
 }
 completion:
 ^( BOOL finished ){
    // cleanup after the transition
 }];
However I can not get the completion handler to work. thanks
it would be like this in Swift 5.x:
UIView.transition(with: self.view, duration: 0.325, options: .curveEaseInOut, animations: {
    // animation
}) { finished in
    // completion
}
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With