storyboard:This class is not key value coding-compliant for the key -
i use storyboard layouts.the process this:
a[uiviewcontroller] ----modal--->[uinavigationcontroller]-----root view controller----->b[uiviewcontroller]
and need value b;so wrote following code in a:
- (void)prepareforsegue:(uistoryboardsegue *)segue sender:(id)sender { [segue.destinationviewcontroller setvalue:@"test" forkey:@"type"]; } but @ time of execution, appear [* terminating app due uncaught exception 'nsunknownkeyexception', reason: '[ setvalue:forundefinedkey:]: class not key value coding-compliant key type.']
can seen value arrived uinavigationcontroller. how pass parameters uinavigationcontroller root view[b]?
- (void)prepareforsegue:(uistoryboardsegue *)segue sender:(id)sender { uinavigationcontroller * nav = segue.destinationviewcontroller; [[nav.viewcontrollers objectatindex:0] setvalue:@"test" forkey:@"type"]; }
Comments
Post a Comment