How to pass data from one View to other view in IOS using UIStoryboard segues?

前端 未结 2 470
無奈伤痛
無奈伤痛 2021-01-16 01:17

I am using Xcode 4.3.1. I have created the UI using Storyboard which has many View Controllers.

Issue

In my app i am usin

2条回答
  •  一生所求
    2021-01-16 01:56

    You need to create string object in SecondViewController and set Property(nonatomic,retain) and synthesize it and after below code add when you push controller.

    SecondViewController *objSecondViewController=[[SecondViewController alloc] 
    initWithNibName:@"SecondViewController" bundle:nil];             
    
    objSecondViewController.strtitle=@"Your data";
    [self.navigationController pushViewController:objSecondViewController animated:YES];
    [objSecondViewController release];
    

提交回复
热议问题