在某种程度上更新UITableView时应该“锁定”吗?
也就是说,在UITableView的数据刷新期间(假设需要几秒钟),应该以某种方式锁定视图本身,以便用户无法点击行等。
只是想知道开发者应该采取哪些预防措施(如果有的话)。
Should one "lock" a UITableView whilst it is updating somehow?
That is, during a data refresh for a UITableView (assuming it takes a few seconds), should one be somehow locking the view itself so that users can't click through on rows etc?
Just wondering what precautions (if any) a developer should take here.
最满意答案
取决于上下文。 一种常见的解决方案是,如果不能保证表格的内容在加载完成后仍然有效,则应使用半透明的全屏覆盖视图来显示活动指示器或进度条。 如果您只是加载新数据,即表中的旧数据仍然有效,例如当您刷新新闻提要或类似内容时,应该不需要锁定任何内容。
Depends on the context. A common solution, when there’s no guarantee that the contents of the table will still be valid once the load completes, is to cover it with a semitransparent full-screen overlay view displaying an activity indicator or a progress bar. If you’re just loading new data, though—i.e. the old data in the table is still valid, like when you’re refreshing a news feed or similar—there shouldn’t be a need to lock anything.
更多推荐
发布评论