前段时间在分析一个崩溃bug,发现原来iOS9.0.x的UIScrollView有一个bug,具体表现为,当我继承UIScrollView,并重写setDelegate方法,如下:

- (void)setDelegate:(id)delegate {
    [super setDelegate:self];
}

当调用.delegate=xxx,就会出现如下崩溃信息:

objc[88233]: Cannot form weak reference to instance (0x7fc37c857400) of class TestScrollView. It is possible that this object was over-released, or is in the process of deallocation.

当然也在iOS8上测试,是没问题的,目前已反馈给Apple.