Presenting a view controller programmatically in swift

前端 未结 2 1119
既然无缘
既然无缘 2021-02-07 19:43

Hi I am trying to convert the following objective C code into swift to navigate from one view controller to another view controller when a button is clicked. any help would be m

2条回答
  •  攒了一身酷
    2021-02-07 20:35

    I made a simple solution. Here it is..

    func actioncall () {
        let loginPageView =  self.storyboard?.instantiateViewControllerWithIdentifier("LoginPageID") as! ViewController
        self.presentViewController(loginPageView, animated: true, completion: nil)
    }
    

提交回复
热议问题