行を含むテーブル ビューがあります... 1 つの項目を選択した後、新しいデータ ソースで tableView を表示したいと考えています。
私は実装しようとしました:
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[self.searchDisplayController setActive:YES animated:YES];
Game *game = [self.filteredListContent objectAtIndex:indexPath.row];
//name your class names with capitals
NSMutableArray *arrayToBeAdded= [[NSMutableArray alloc]initWithArray:newgamearray];
[ListContent removeAllObjects];
[ListContent addObject:arrayToBeAdded];
しかし、私は例外を取得しています
[ListContent removeAllObjects];
初期化の実装:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellID = @"cellSgames";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellID];
if (cell == nil)
{
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellID] autorelease];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
Gmage *game = [self.ListContent objectAtIndex:indexPath.row];
.h ファイルで次のように宣言します。
NSArray AllList;
NSMutableArray ListContent;
何か案は?