http://www.tuicool.com/articles/eI7jiaE
如果你希望在特定条件下segue跳转,则需要
-(BOOL)shouldPerformSegueWithIdentifier:(NSString *)identifier sender:(id)sender
{
return NO;//开始不允许跳转,只有当验证账号和密码正确可以进入后由登录代码执行切换
}
然后在登陆的action内写:
- (IBAction)login:(id)sender
{
if(满足条件)
[self performSegueWithIdentifier:@"loginSegue" sender:self];
}