iOS - Push viewController from code and storyboard

后端 未结 5 1219
我在风中等你
我在风中等你 2020-12-01 18:30

I have this code

 PlaceViewController *newView = [self.storyboard instantiateViewControllerWithIdentifier:@\"PlaceView\"];
 [self presentViewController:newVi         


        
5条回答
  •  情歌与酒
    2020-12-01 19:13

    Swift 3.x

    let viewController = storyboard?.instantiateViewController(withIdentifier: "storyboardIdentifier") as! UIViewController
    navigationController?.pushViewController(viewController, animated: true)
    

提交回复
热议问题