Comments (5)
大神 看看什么问题呗 求解决
from avoidcrash.
过滤掉啊 , 也许对你有用👇:
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.
这个判断写在哪?大佬
我上面的方法写在AppDelegate里面的
from avoidcrash.
会冲突的,UIKit中的个别类针对个别方法的实现 都在最后面一层来实现的,也就是一开始没有实现某个方法,但是UIKit会在最后关头进行方法的一些处理(比如消息的转发)。
若将@"NSObject"添加到数组中(NSArray *noneSelClassStrings = @[@"NSObject"];)
则会拦截了系统的默认的处理(消息转发)。
所以对于UIKit的一些操作需要谨慎,对于AvoidCrash的使用注意事项,请看下面链接:
https://www.jianshu.com/p/2b90aa96c0a0
from avoidcrash.
我写@"NSObject"的原因是我本来想监测一下我的BaseModel 😁 既然不能写,那就不写NSObject 谢谢大佬的耐心解答,😘
from avoidcrash.
Related Issues (20)
- Reveal 查看视图结构时, App 闪退 HOT 1
- 死循环导致项目奔溃 HOT 1
- 调用相册时出现的闪退没能捕捉到
- 和第三方有冲突
- 死循环,卡在了启动页 HOT 4
- 偶现的一个crash,但是不太确定是否是添加AvoidCrash导致 HOT 8
- 启动崩溃 !!! HOT 6
- 用try-catch来捕获unrecognized selector sent to instance异常?
- 字符串拼接的异常不能捕获 HOT 1
- 跟MJRefresh 有崩溃冲突 !!!!! HOT 1
- setupNoneSelClassStringPrefixsArr加上前缀Crash
- 效率
- NSMutableString部分崩溃拦截失败 HOT 1
- 子线程上刷新ui的崩溃能拦截吗
- Debug View Hiervrchy 无法打开 HOT 1
- __NSArrayM 交换objectAtIndex:方法之后内存持续增加
- 大佬你要坚持住并加油呀!!! HOT 1
- 子线程操作UI防护能搞里面吗,😄
- 希望大家继续共建!
- About PrivacyInfo.xcprivacy HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from avoidcrash.