Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有这个视图有缩略图和某些按钮。
我正在使用 TTThumbsViewController 来呈现此视图,并使用 MockDataSource(在 TTCatalog 中提供)来存储图像。
我的数据源是动态的,并且在一段时间内每次都会发生变化。
现在我想做的是在同一个缩略图屏幕上单击按钮后刷新(重新加载)缩略图有什么办法可以实现吗???
TTThumbsViewController 继承自 TTTableViewController,TTTableViewController 继承自 TTModelViewController。
如果您的数据源是使用 createModel 函数创建的,您可以让按钮调用 invalidateModel 来重新生成缩略图。
或者,您可以将您的数据源创建移动到一个函数并重新运行它并在视图上重新加载。