I want to send data to parentviewcontroller but the following code crashes. Give me the solution
Post *vc;
vc.abc =@\"Comment Conttroller\";
[self.parentView
vc doesn't seem to be initialized.
You can probably do this,
vc = (Post *)self.parentViewController;
vc.abc = @"Comment Conttroller";
[vc dismissModalViewControllerAnimated:YES];
Since the view controller you want to affect is the parentViewController, you should be able to cast and set the abc property.