objective c - pushViewController pushes nil -
i trying push view controller screen. push successful when later try access property of pushed view controller including textboxes , labels, nil.
how avoid this?
i doing way because need code decide view controller push. appreciated.
myvc *vc = [self.storyboard instantiateviewcontrollerwithidentifier:@"myvc"]; [self.navigationcontroller pushviewcontroller:vc animated:yes];
after code you've wrote, need either approach properties this:
vc.property = assignedvalue;
make sure have synthesized properties, or initialised them setter in vc's viewdidload
Comments
Post a Comment