Open / Close screen in navigation by coding

Open:

let storyBoard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
        let newViewController = storyBoard.instantiateViewController(withIdentifier: "ZommPhotoViewController") as! ZommPhotoViewController
        newViewController.image = image

        self.navigationController?.pushViewController(newViewController, animated: true)


Close:

self.navigationController?.popViewController(animated: true)

Comments

Popular posts from this blog

return value to controller caller

Apple Push Notification Service APNS

Delivery In House iOS app