我的UITableView返回EXEC_BAD_ACCESS
,但为什么!EXEC_BAD_ACCESS在UITableView cellForRowAtIndexPath
查看此代码段!
加载UITableView的工作正常,所以allXYZArray != nil
和填充!
然后滚动的tableview的底部和备份导致其崩溃,因为它会重新加载方法的cellForRowAtIndexPath
它未能就行:
"NSLog(@"allXYZArray::count: %i", [allXYZArray count]);"
(UITableViewCell *)tableView:(UITableView *)theTableView cellForRowAt
IndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"CellIdentifier";
UITableViewCell *cell = [theTableView dequeueReusableCellWithIdentifier:CellIdentifier];
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
@try
{
if (allXYZArray == nil) {
NSLog(@"nil");
allXYZArray = [ToolBox getMergedSortedDictionaries:allXYZGiven SecondDictionary:allXYZSought];
}
NSLog(@"%i", [indexPath row]);
NSLog(@"allXYZArray::count: %i", [allXYZArray count]);
您可以将方法的其余部分的代码发布[ToolBox getMergedSortedDictionaries:SecondDictionary:]的代码? – MrHen 2010-05-12 19:16:13