我越来越构建应用程序时发现多个名为“count”的方法结果、参数类型或属性错误不匹配。该应用程序在 32 位中运行良好。我已将其更改为 64 位苹果指南 https://developer.apple.com/news/?id=12172014b。我已经提到过这个Link https://stackoverflow.com/questions/22313294/multiple-methods-named-count-found-with-mismatched-result-parameter-type-or-a但没有得到任何帮助。
我已经在模拟器上的多个设备上测试了应用程序。在32位下运行正常,但在64位下提示错误。为什么会这样呢?
-(void)serviceSuccessFulForPatientSelect:(id)response
{
[self hideOverlay];
if([response isKindOfClass:[NSArray class]])
{
if([response count]>0)
{
if(1)
{
...
}
}
}
[refillDetailTable reloadData];
}
if([response count]>0)
response
is an id
在这里,错误表明有多种方法称为count
返回不同类型 -int
and NSInteger
我认为在 64 位中不同,但在 32 位中是相同的。
要修复,请执行强制转换:
if([(NSArray*)response count]>0)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)