iOS swipe down to close for popupview || iOS latest feature

Solution:

In iOS 13 there is a huge option that will popover one view to another and swipe down the view to close.

We can see how to achieve that.

Code:

            let anotherView = self.storyboard?.instantiateViewController(withIdentifier: "anotherView")
            if #available(iOS 13.0, *) {
                anotherView?.isModalInPresentation = false
            } else {
                // Fallback on earlier versions
            }
            self.present(anotherView!, animated: true, completion: nil)

The above code is for present the view and swipe down we can close that.

Comments

Popular posts from this blog

How to blink a button iOS swift?

Convert NsNumber, NSDate to String in iOS Swift

Parse the value from string value iOS swift