Skip to content

dispatch_after倒计时存在页面消失后仍然执行 block 的 问题 #3

@crossPQW

Description

@crossPQW
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
            [self timer];
        });

在点击了跳过广告图页面销毁之后,block 内部[self timer]仍然会继续执行,建议替换为 NSTimer实现倒计时

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions