Snippets Collections
// 1st method

if let storyboard = self.storyboard {
            let vc = storyboard.instantiateViewController(withIdentifier: "ForgotPasswordViewController") as! ForgotPasswordViewController
            vc.modalPresentationStyle = .fullScreen
            self.present(vc, animated: false, completion: nil)
        }

// 2nd method

    func nextVC(identifier: String) {
        if let storyboard = self.storyboard {
            let vc = storyboard.instantiateViewController(withIdentifier: identifier)
            vc.modalPresentationStyle = .fullScreen
            self.present(vc, animated: false, completion: nil)
        }
    }
star

Fri Jan 27 2023 17:13:07 GMT+0000 (Coordinated Universal Time)

#ios #swift #vc #next #nextvc #snippet
star

Tue Jul 27 2021 10:57:33 GMT+0000 (Coordinated Universal Time) https://www.youtube.com/watch?v

#next

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension