草庐IT

ios - 如何在 iOS Swift 3 中以编程方式推送和呈现给 UIViewController 而无需 segue

我正在使用此代码在iOS中以编程方式推送SHOW和MODALLY>objective-c。现在想了解Swift3。NewsDetailsViewController*vc=instantiateViewControllerWithIdentifier:@"NewsDetailsVCID"];vc.newsObj=newsObj;//--this(SHOW)[self.navigationControllerpushViewController:vcanimated:YES];//--orthis(MODAL)[selfpresentViewController:vcanimated:Y

ios - 如何在 iOS Swift 3 中以编程方式推送和呈现给 UIViewController 而无需 segue

我正在使用此代码在iOS中以编程方式推送SHOW和MODALLY>objective-c。现在想了解Swift3。NewsDetailsViewController*vc=instantiateViewControllerWithIdentifier:@"NewsDetailsVCID"];vc.newsObj=newsObj;//--this(SHOW)[self.navigationControllerpushViewController:vcanimated:YES];//--orthis(MODAL)[selfpresentViewController:vcanimated:Y