난 네비게이션 컨트롤러 앱에서 탭 바 앱으로 만드는 앱을 변환했다.didselectrowatindexpath와 관련된 문제
모든 것은이 한 가지와 별개로 작동합니다. 내 탭 중 첫 번째는 테이블보기를 가져오고, 사용자가 셀을 선택하면 다른보기 컨트롤러 (예 : 이 네비게이션 응용 프로그램)
을 때 그것은했다 그러나 이것은 더 이상 내가 문제는 self.navigationController
에
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[tableView deselectRowAtIndexPath:indexPath animated:NO];
StoryDetailViewController *storyDetailViewController = [[StoryDetailViewController alloc] initWithNibName:@"DetailView" bundle:nil];
WorldCupAppDelegate *appDelegate = [UIApplication sharedApplication].delegate;
Story *aStory = [appDelegate.stories objectAtIndex:indexPath.row];
NSURL *url = [NSURL URLWithString:aStory.picture];
NSData *data = [NSData dataWithContentsOfURL:url];
UIImage *img = [[UIImage alloc] initWithData:data];
storyDetailViewController.downloadedImage = img;
storyDetailViewController.story = [appDelegate.stories objectAtIndex:indexPath.row];
[self.navigationController pushViewController:storyDetailViewController animated:NO];
NSLog(@"view controller pushed");
[StoryDetailViewController release];
}
"뷰 컨트롤러가 눌려져 있습니다"... ...가 인쇄됩니까? 및 [tableView deselectRowAtIndexPath : indexPath animated : NO]; 이 줄은 함수의 마지막 줄이어야합니다 ... –