ios - Data passed to prepareForSegue is nil -
i'm trying ingredientviewcontroller
update array belongs controller called via segue (fridgeviewcontroller
)
in ingredientviewcontroller
fridgemanager nil no matter try
the code:
fridgeviewcontroller:
- (void)prepareforsegue:(uistoryboardsegue *)segue sender:(id)sender { // new view controller using [segue destinationviewcontroller]. // pass selected object new view controller. ingredientviewcontroller *controller = (ingredientviewcontroller *)segue.destinationviewcontroller; [controller setfridgemanager:fridgemanager]; }
ingredientviewcontroller:
@property (strong, nonatomic) fridgedatamanager *fridgemanager;
and in viewdidload fridgemanager
nil (and in other method of coarse)
synthesize fridgemanager property in ingredientviewcontroller.m
@synthesize fridgemanager;
Comments
Post a Comment