I want to send data to parentviewcontroller but the following code crashes. Give me the solution
Post *vc;
vc.abc =@"Comment Conttroller";
[self.parentViewController dismissModalViewControllerAnimated:YES];
Here, Post is the controller name from where I am calling the presentViewController:animated:completion method.
vcdoesn’t seem to be initialized.You can probably do this,
Since the view controller you want to affect is the
parentViewController, you should be able to cast and set theabcproperty.