Snippets Collections
  if let presentingViewController = self.presentingViewController?.presentingViewController {
            presentingViewController.dismiss(animated: false) {
                BottomBarViewController.BottomBarVC.embedFavoritesVC()
            }
        }
// 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

Thu Mar 02 2023 10:45:29 GMT+0000 (Coordinated Universal Time)

#ios #swift #vc #dismis #dismiss #dissmis
star

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

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

Save snippets that work with our extensions

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