Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOS 9.2 以下方法会crash. #101

Open
billychen2014 opened this issue Dec 24, 2015 · 4 comments
Open

IOS 9.2 以下方法会crash. #101

billychen2014 opened this issue Dec 24, 2015 · 4 comments

Comments

@billychen2014
Copy link

//解决当父View释放时,当前视图因为被Timer强引用而不能释放的问题

  • (void)willMoveToSuperview:(UIView *)newSuperview
    {
    [super willMoveToSuperview:newSuperview];/// 我尝试加上这句,不知道能不能解决

    if (!newSuperview) {
    [_timer invalidate];
    _timer = nil;
    }
    }

@gsdios
Copy link
Owner

gsdios commented Dec 25, 2015

崩溃报什么错误呢?

@TJRoger
Copy link

TJRoger commented Dec 25, 2015

一般只有override开头的方法需要添加super

@gsdios
Copy link
Owner

gsdios commented Dec 26, 2015

新建QQ交流群:185534916,欢迎加入!

@billychen2014
Copy link
Author

Hello,
报的错不是那种明显的,是在线上的运行环境里通过dwarf定位到的这句,so.

xcrun atos -arch arm64 -o XXXXold.app.dSYM/Contents/Resources/DWARF/XXX 0x100070000
-[SDCycleScrollView willMoveToSuperview:](in XXXX) (SDCycleScrollView.m:392)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants