ios - Swift access another class without creating a new instance -
i have ios app view contains container holding tableview. want access function tableview controller, don't want create new instance of tableview in process. tried , creates new instance meaning can't change variables displayed on view.
from firstviewcontroller, how can access function updatebuckets in buckettableviewcontroller running instance?
currently i'm trying self.buckettableviewcontroller.updatebuckets(self.bigarray) , receiving error firstviewcontroller not have member named buckettableviewcontroller
see recent answer: how can update other controllers' ui in swift?
notifications best bet. create notification in firstviewcontroller called "dataupdated" or something. in buckettableviewcontroller, can watch notification.
alternatively, if "ui" you're updating table itself, should update data source, call reloaddata() on tableview.
Comments
Post a Comment