iphone - How to access UITableView from delegate? -
when dismiss modal, i'm overriding viewwillappear
in order make table view in view reload. problem don't have pointer table view call refresh. i've considered awkward solution such storing in pointer when tableview first loads , calls uiviewcontroller
(the delegate) each row, seems there hast pointer somewhere. know how it?
it's common viewcontroller
uitableview
in it's view hierarchy (even root, in case of uitableviewcontroller
) keep weak pointer uitableview
kind of thing.
if uitableview
built in storyboard/xib
, set iboutlet
, otherwise, build uitableview
in code, add subview , assign pointer self.tableview
.
viewwillappear
sensible place [self.tableview reloaddata]
Comments
Post a Comment