我的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