标签:
- (void)perform { NSLog(@"使用自定义连接"); [self.sourceViewController presentViewController:self.destinationViewController animated:YES completion:nil]; }
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([[segue identifier] isEqualToString:@"2vc2"]) { ViewController2 *vc2 = (ViewController2 *)[segue destinationViewController]; vc2.passText = @"使用prepareForSegue:sender进行页面传值"; } }在ViewController2.m中把passText的值赋给recTextView.text
- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. _recTextView.text = _passText; }
StoryBoard初探(三):自定义Segue以及页面间传值
标签:
原文地址:http://blog.csdn.net/nextstudio/article/details/42121177