Suppose there are 2 parameters to send on next view as CustomerName and Email then code will be :
-(IBAction)btnNextViewClicked:(id)sender
{
UIStoryboard * myStoryboard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" bundle:nil];
NextViewController * nextView = [myStoryboard instantiateViewControllerWithIdentifier:@"nextViewCNTR"];
nextView.validEmail = @"abc@gmail.com";
nextView.customerName = @"ABC";
[self.navigationController nextView animated:YES];
}
如果 U 没有参数,则:
-(IBAction)btnNextViewClicked:(id)sender
{
UIStoryboard * myStoryboard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" bundle:nil];
NextViewController * nextView = [myStoryboard instantiateViewControllerWithIdentifier:@"nextViewCNTR"];
[self.navigationController nextView animated:YES];
}
nextViewCNTR 是在 XCode 中设计时放置在流线上的标识符的名称。
使用并让我知道反馈。