Giter Club home page Giter Club logo

Comments (5)

Etermally avatar Etermally commented on August 20, 2024

大神 看看什么问题呗 求解决

from avoidcrash.

Wuou avatar Wuou commented on August 20, 2024

过滤掉啊 , 也许对你有用👇:
NSString *methodName = NSStringFromSelector(aSelector);
if ([NSStringFromClass([self.objc class]) hasPrefix:@"_"] || [self.objc isKindOfClass:NSClassFromString(@"UITextInputController")] || [NSStringFromClass([self.objc class]) hasPrefix:@"UIKeyboard"] || [methodName isEqualToString:@"dealloc"]) {

    return nil;
}

from avoidcrash.

Etermally avatar Etermally commented on August 20, 2024

这个判断写在哪?大佬
我上面的方法写在AppDelegate里面的

from avoidcrash.

chenfanfang avatar chenfanfang commented on August 20, 2024

会冲突的,UIKit中的个别类针对个别方法的实现 都在最后面一层来实现的,也就是一开始没有实现某个方法,但是UIKit会在最后关头进行方法的一些处理(比如消息的转发)。

若将@"NSObject"添加到数组中(NSArray *noneSelClassStrings = @[@"NSObject"];)
则会拦截了系统的默认的处理(消息转发)。

所以对于UIKit的一些操作需要谨慎,对于AvoidCrash的使用注意事项,请看下面链接:
https://www.jianshu.com/p/2b90aa96c0a0

from avoidcrash.

Etermally avatar Etermally commented on August 20, 2024

我写@"NSObject"的原因是我本来想监测一下我的BaseModel 😁 既然不能写,那就不写NSObject 谢谢大佬的耐心解答,😘

from avoidcrash.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.