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

store cgpoint in userdefaults iOS swift

libc++abi: terminating due to uncaught exception of type NSException iOS swift