먼저 Objective-C 및 iOS 프로그래밍에 대해 처음 소개해 드리므로이 답변이 분명히 나에게는 용서하십시오. .Apress 서적에서 Segue 코드가 작동하지 않는다 iOS 5 시작하기 스토리 보드에 대한 10 장
이제 Apress Beginning iOS 5 서적을 읽으므로 10 장에서 스토리 보드에 관해서는 예제 중 하나를 실행하려고 할 때 다음과 같은 문제가 발생합니다.
이 코드 블록은 목록의 작업 텍스트를 다음 페이지의 텍스트 입력 필드로 전달한다고 가정합니다. 다음은이 책의 코드입니다. 그러나 코드를 빌드하고 실행하려고하면이 오류가 발생합니다. 'BIDTaskListController *'유형의 객체에서 'tableView'속성을 찾을 수 없습니다.
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
UIViewController *destination = segue.destinationViewController;
if ([destination respondsToSelector:@selector(setDelegate:)]) {
[destination setValue:self forKey:@"delegate"];
}
if ([destination respondsToSelector:@selector(setSelection:)]) {
// prepare selection info
NSIndexPath *indexPath = [self.tableView indexPathForCell:sender]; // Error on this line
id object = [self.tasks objectAtIndex:indexPath.row];
NSDictionary *selection = [NSDictionary dictionaryWithObjectsAndKeys:
indexPath, @"indexPath",
object, @"object",
nil];
[destination setValue:selection forKey:@"selection"];
}
}
또한 Xcode 4.4를 실행하고 있습니다. 어떤 도움이라도 대단히 감사 할 것입니다. 감사.
감사합니다, 팀
컴파일러가 존재하지 않는다고 생각하는 현재 객체에서 'tableView'라는 속성에 액세스하려고합니다. 'BIDTaskListController' 클래스 내에서'tableView'는 어떻게 정의되어 있습니까? –