Closed chasen-d closed 6 years ago
解决方法:
(void)viewWillDisappear:(BOOL)animated{ [super viewWillDisappear:animated];
[self.webView.scrollView removeObserverBlocks]; [self.webView removeObserverBlocks]; }
70行我写的有问题, 抱歉. viewWillDisappear: 里边写移除观察者会有问题: 比如通过H5交互, present出来一个界面A, A消失后; 观察者就有问题.
倒是忽略了这一点,知识单纯的看demo了
解决方法:
(void)viewWillDisappear:(BOOL)animated{ [super viewWillDisappear:animated];
[self.webView.scrollView removeObserverBlocks]; [self.webView removeObserverBlocks]; }