하나의 항목을 선택한 후 행이있는 테이블보기가 있습니다. 새 데이터 소스로 tableView를 표시하려고합니다. 선택한 행 다음에 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];
구현에 exeption를 받고 : 내가 선언 .H 파일에서
- (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];
:
NSArray AllList;
NSMutableArray ListContent;
어떤 아이디어가 있습니까?
왜 새 데이터 소스로 tableView를 표시하겠습니까? – freelancer
아이템을 선택한 후 아이를 보여주고 싶습니다. – vadim
@vadim 예외는 무엇입니까? ListContent는 어디에 선언 되었습니까? 이게 뭐야? –