How to transfer parameters between view controller

The first ViewController:
OrderRateViewController *orderRateViewController = [[OrderRateViewController alloc] initWithNibName:@"OrderRateViewController" bundle:nil];
NSDictionary *order= _orderArray[b.tag];
NSString *orderId = [order objectForKey:@"id"];
orderRateViewController.orderId = orderId;
[self.navigationController pushViewController:orderRateViewController animated:YES];
[orderRateViewController release];

Second ViewController:
Declared in the.H file:
@property (strong, nonatomic) NSString *orderId;

From second ViewController to return to the first ViewController EXC_BAD_ACCESS always report errors.
Put the following line comment out without error:
orderRateViewController.orderId = orderId;
Please do me a favor.
Then, want to ask like this between the two ViewController parameters are generally do, my approach is not a problem?

Started by Buck at December 04, 2016 - 12:10 AM

Assignment orderId, to try this:

orderRateViewController.orderId = [NSString stringWithString:orderId];

Posted by Duncan at December 07, 2016 - 12:53 AM

Thank you, should generate a new object passed just fine, thank you very much.

Posted by Buck at December 19, 2016 - 1:24 AM

Two viewControl direct transmission parameters and data, commonly used methods: 1 single mode notification to the value 2.
I hope to help you, if you have a better way, the trouble to share, learn from each other.

Posted by Claudia at January 03, 2017 - 1:53 AM

The portal

Posted by Meredith at January 06, 2017 - 2:14 AM