美文网首页
iOS处理unrecognized selector

iOS处理unrecognized selector

作者: 来根黄鹤楼啊 | 来源:发表于2019-02-24 18:49 被阅读0次

处理unrecognized selector 这个方法 利用runtime 机制当中的消息转发机制

拯救报错三步

1Method resolution

objc+resolveInstanceMethod:+resolveClassMethod:

Message Forwarding

2Fast forwarding

-forwardingTargetForSelector:Runtime nilselfNormal FowardingFastNSInvocation

3Normal forwarding

RuntimenilRuntime-doesNotRecognizeSelector:RuntimeNSInvocation-forwardInvocation:

相关文章

网友评论

      本文标题:iOS处理unrecognized selector

      本文链接:https://www.haomeiwen.com/subject/drpbyqtx.html