2015-06-08 87 views

回答

0

在按一下按钮,就可以出现或推视图控制器如果您有赛格瑞连接它,你可以这样做:

if(easySelected) 
    [self performSegueWithIdentifier:@"easyOne" sender:self]; 
else if 
    ... 

如果你有导航控制器或想要现在它可以做:

UIStoryboard *story = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]]; 
EasyViewConroller *cont = [story instantiateInitialViewController]; 
// or EasyViewConroller *cont = [story instantiateViewControllerWithIdentifier:@"YourIdent"]; 
// in former solution you have to set that identifier in the code/storyboard 

// navigation/push 
self.navigationController pushViewController:cont animated:YES]; 

// if you want to present it 
[self presentViewController:cont animated:YES completion:nil]; 

编辑:

if(easySelected){ 
    self.performSegueWithIdentifier("easyOne" sender:self) 
{ 
else if{ 
    ... 
} 

//If you have navigation controller or want to present it you can do: 
var tempStory = UIStoryboard(name: "Main", bundle: NSBundle.mainBundle()) 
var tempVC = tempStory.instantiateInitialViewController() as! EasyViewController 

//present 
self.presentViewController(tempVC, animated: true) 

//push 
self.navigationController?.pushViewController(tempVC, animated: true) 
+0

尼克Catib谢谢你,但你可以使用快捷 –

+0

当然,给我为10分钟展示给我 – Miknash

+0

很抱歉,如果你把它给了我两个可能性还是什么我没undersatnd ? –

相关问题