Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/fsharp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
IOS 7.1 NSMutableDictionary valueForKey计数_Nsmutabledictionary_Ios7.1 - Fatal编程技术网

IOS 7.1 NSMutableDictionary valueForKey计数

IOS 7.1 NSMutableDictionary valueForKey计数,nsmutabledictionary,ios7.1,Nsmutabledictionary,Ios7.1,遇到了一个非常奇怪的错误。 我已将xcode更新为最新版本,因此使用IOS7.1编译了我的应用程序,这在模拟器中非常有效,但当我尝试将应用程序存档以进行分发时,我遇到以下代码行错误: - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { if(self.count == 0) { return 0; } else { re

遇到了一个非常奇怪的错误。 我已将xcode更新为最新版本,因此使用IOS7.1编译了我的应用程序,这在模拟器中非常有效,但当我尝试将应用程序存档以进行分发时,我遇到以下代码行错误:

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    if(self.count == 0) {
        return 0;
    } else {
        return [[self.meetings valueForKey:[[[self.meetings allKeys] sortedArrayUsingSelector:@selector(localizedCaseInsensitiveCompare:)] objectAtIndex:section]] count];
    }
}
错误如下所示:

    return [[self.meetings valueForKey:[[[self.meetings allKeys] sortedArrayUsingSelector:@selector(localizedCaseInsensitiveCompare:)] objectAtIndex:section]] count];
错误消息是:

找到多个名为“count”的方法,其结果、参数类型或属性不匹配

更新到IOS 7.1后,还有其他人有此问题吗

/*编辑*/

通过打字找到了解决方案

return [(NSMutableArray *) [self.meetings valueForKey:[[[self.meetings allKeys] sortedArrayUsingSelector:@selector(localizedCaseInsensitiveCompare:)] objectAtIndex:section]] count];

提前感谢

尝试使用局部变量将此行拆分为几行,例如获取排序数组、在索引处获取对象、获取键的值、返回计数。另见: