항목 목록을 UITableview에로드하고 선택한 행에 대한 경고를 클릭하여 표시 할 수있었습니다. 그러나 경고에서 "ok"라고 말한 후 이미 선택된 행에서 다시 읽으면 "코드 1 : 프로그램 수신 신호 : EXC_BAD_ACCESS"라는 코드가 나옵니다. 아래 코드를 살펴보십시오.UITableView didSelectRowAtIndexPath 오류 - 항목을 다시 선택할 때
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
NSDictionary *playerselected = [exercises objectAtIndex:indexPath.row];
NSString *video = [playerselected valueForKey:@"video"];
NSString *msg = [[NSString alloc] initWithFormat:@"You have selected %@", video];
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Player selected"
message:msg
delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];
[alert release];
[video release];
[msg release];
}
제발 여기서 어떤 문제가 될 수 있는지 제안 해주세요.
확인해 보았습니다. 특히 염두에 두어야 할 질문이 있습니까? 농담 만하고, 특정 질문을하면 도움이되지만 문제점을 해결하는 데 도움이되도록 가능한 한 자세하게 설명하십시오 (예를 들어 오류가 발생하는 행). 약간의 설명만으로 코드를 버리면 다른 사람들이 도울 수있는 좋은 인센티브가 될 수 없습니다. – Mac
Sry MAc .. 위의 질문을 수정하십시오. – UnlimitedMeals