滚动到顶部后未调用 TodayExtension 的 ViewWillAppear

TodayExtension's ViewWillAppear not called after scrolling to the top

我使用 tableview 来显示小部件内容,一切正常,除了我将 TodayExtension 滚动到底部并滚动回顶部 (ViewWillDisappear 调用)并且当我尝试向下滚动时,viewWillAppear 将永远不会被调用,因此我无法点击 table。但是,如果我再次拖动扩展程序,或从通知切换,table视图可以点击。

神秘的是,如果我选择编辑>删除>重新添加,这个错误永远不会出现。但如果我每次编译代码都这样做就没有意义(甚至用户从 AppStore 更新应用程序也不行)

我在论坛上搜索过类似的问题,但还没有解决方案。

  1. https://forums.developer.apple.com/thread/16348
  2. http://www.openradar.me/22545070
  3. Today Extension widget freezes when the main app is updated

忘记更新这个问题将近1年了。

总算找到原因了。 只出现在开发模式下是apple的bug。一旦发布,问题将不再发生。