refresh TTThumbsViewController on a buttonClick in Three20

烂漫一生 提交于 2019-12-11 19:00:26

问题


I have this view having Thumbnails and certain set of buttons.

I am using TTThumbsViewController to render this view and MockDataSource (provided in TTCatalog) to store images.

my datasource is dynamic and changes everytime in some period of time.

Now what I want to do is refresh(reload) the thumbnails after clicking a button on the same Thumbnails screen is there any way to achieve this???


回答1:


TTTHumbsViewController inherits from TTTableViewController which inherits from TTModelViewController.

If your dataSource is created using the createModel function, you can have the button call invalidateModel to regenerate the thumbnails.

Alternatively, you could just move your dataSource creation to a function and re-run that and do a reload on the view.



来源:https://stackoverflow.com/questions/1973239/refresh-ttthumbsviewcontroller-on-a-buttonclick-in-three20

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!