objective c - UITableView delegate not called when UIViewController is popped -
i have view controller contains uitableview. when view controller gets pushed onto stack, table view delegate methods called , populates table.
then push view controller onto 1 contains table view. make happen - when second view controller gets popped , return previous view controller, uitableview delegate methods called again (so repopulate table).
in other words, how repopulate uitableview when popping view controller.
thanks
in viewdidload
or viewdidunload
, viewwillappear
, viewwilldisappear
(whichever of these right situation) can put [mytable reloaddata];
:
// if can include code bit uncertain // trying question // should use whichever of these correct project: - (void)viewdidload { [super viewdidload]; [mytable reloaddata]; } - (void)viewdidunload { [mytable reloaddata]; } - (void)viewwillappear { [super viewwillappear]; [mytable reloaddata]; } - (void)viewwilldisappear { [super viewwilldisappear]; [mytable reloaddata]; }
Comments
Post a Comment