我将ElementParser导入到我的项目中,以便解析html字符串。但xcode在以下代码中报告警告:xcode:如何隐藏此警告?
if ([connectionDelegate respondsToSelector:@selector(connection:didFailWithError:)])
[connectionDelegate connection:connection didFailWithError: error]; // Warning at this line
由于第一行有一个检查,第二行必须在运行时安全。
我真的不喜欢在我的项目中存在警告。所以我想知道是否有隐藏这个警告?
是否有可能使用的协议?如果'connectionDelegate'输入正确(符合正确的协议),并且'connection:didFailWithError:'方法在该协议中是可选的,那么上述内容不应该产生警告。 – dreamlax
'connectionDelegate'是什么类型? 'ID? 'ID ?还有别的吗? –
Rob
导致代码来自githut,而不是我自己编写的代码,我不想修改任何行或修改尽可能少的行。 – TieDad