cocoa touch - Can't set outlets when I push a UIViewController without animating -
i have uinavigationcontroller push uiviewcontrollers onto using pushviewcontroller:animated:. after this, call method on incoming view set of ib outlets. unfortunately, these set when animate view.
so work:
myviewcontroller *newview = [[myviewcontroller alloc] initwithnibname:@"myviewcontroller" bundle:nil]; [self.navigationcontroller pushviewcontroller:newview animated:yes]; [newview updateoutletsforobject:myobject]; but won't:
myviewcontroller *newview = [[myviewcontroller alloc] initwithnibname:@"myviewcontroller" bundle:nil]; [self.navigationcontroller pushviewcontroller:newview animated:no]; [newview updateoutletsforobject:myobject]; does know why happening? in advance.
it seems me parent view controller shouldn't setting child's outlets. should handling iboutlet connections in -viewdidload of child view controller.
Comments
Post a Comment