It is not respondsToSelector:, performSelector: that are banned. The ban is on putting dynamic content as a parameter to this method. For example, this is not banned:
if([self.delegate respondsToSelector: @selector(myDelegateMethod)]) {
[self.delegate performSelector: @selector(myDelegateMethod)];
}
However, this code might be banned:
NSString *remotelyLoadedString = .... (download from your backend)
[self performSelector: NSSelectorFromString(remotelyLoadedString)];
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…