iOS开发 判断代理以及代理方法是否有人遵循 if (self.delegate && [self.delegate respondsToSelector:@selector]) { return YES; }