iOSInterviewQuestions icon indicating copy to clipboard operation
iOSInterviewQuestions copied to clipboard

forwardingTargetForSelector返回self不会死循环吧。

Open ryanzhuang opened this issue 9 years ago • 2 comments

如题,亲测

ryanzhuang avatar Oct 31 '16 09:10 ryanzhuang

那么到底会不会死循环

Kevin775263419 avatar Feb 15 '22 03:02 Kevin775263419

苹果开发者文档:https://developer.apple.com/documentation/objectivec/nsobject/1418855-forwardingtargetforselector

"Obviously if you return self from this method, the code would just fall into an infinite loop."

显然,如果你在此方法中返回 self,代码将会陷入一个无限循环。

RandomNameForGithub avatar May 08 '22 02:05 RandomNameForGithub