Home  >  Q&A  >  body text

objective-c - iOS程序在ios8的系统下页面跳转后闪退,ios9的系统下不会闪退

1、app在ios8的机子上真机调试,在页面跳转后,在返回到上级界面,再次点击屏幕,就出现闪退.
开启僵尸对象,打印信息如下:* -[_UIWebViewScrollView _systemGestureStateChanged:]: message sent to deallocated instance 0x3183a00
2、app在ios9 的机子上真机调试一切正常。

天蓬老师天蓬老师2709 days ago512

reply all(9)I'll reply

  • PHP中文网

    PHP中文网2017-04-18 09:50:01

    Owner, I have also encountered this problem, but it has not been solved yet. Have you solved it now? Can you communicate with me?

    reply
    0
  • 黄舟

    黄舟2017-04-18 09:50:01

    Be extra careful when using delegate and datasource on iOS8.

    Some delegate and datasource on iOS8 are declared using assign. If not released in time, it is easy to cause a crash.

    It is recommended that wherever delegate is used, its display location should be set to nil in dealloc.

    as

    - (void)dealloc
    {
        _tableView.delegate = nil;
        _tableView.datasource = nil;
        _scrollView.delegate = nil;
        _gesture.delegate = nil;
    }

    reply
    0
  • ringa_lee

    ringa_lee2017-04-18 09:50:01

    • (void)dealloc
      {

      _webView.delegate = nil;

      }

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-18 09:50:01

    viewWillDisappear 里写一句 [self.webView stopLoading];

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-18 09:50:01

    The problem was found because I referenced a third-party buckle and used the swizzle method to cause a memory leak.

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-18 09:50:01

    Which third party does the poster use? Do you mind disclosing it? I have the same problem here...

    reply
    0
  • ringa_lee

    ringa_lee2017-04-18 09:50:01

    After searching for 6 hours, I finally found which library caused it. . . UIScrollView+HeaderScaleImage! ! ! ! !

    reply
    0
  • 阿神

    阿神2017-04-18 09:50:01

    Check whether the UIScrollView category in your project has overridden the dealloc method

    reply
    0
  • 高洛峰

    高洛峰2017-04-18 09:50:01

    Using this UIScrollView+HeaderScaleImage, how to solve it

    reply
    0
  • Cancelreply