У меня есть rootViewController и UIButton, который создается программно.Я хочу, чтобы этот UIButton отображал другой контроллер вида.По какой-то причине происходит сбой со следующей ошибкой:
Неопределенные символы для архитектуры i386:
"_OBJC_CLASS _ $ _ TutorialViewController", ссылка на которую: objc-class-ref в RootViewController.o ld: symbol (s) не найден для архитектуры i386 collect2: ld вернул 1 состояние выхода
вот код, который создает информационную UIButton.этот код находится в методе loadView:
// Create a Button to get Help
UIButton *helpButton = [UIButton buttonWithType:UIButtonTypeInfoDark ] ;
CGRect buttonRect = helpButton.frame;
// CALCulate the bottom right corner
buttonRect.origin.x = self.view.frame.size.width - buttonRect.size.width - 8;
buttonRect.origin.y = buttonRect.size.height - 8;
[helpButton setFrame:buttonRect];
[helpButton addTarget:self action:@selector(doHelp:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:helpButton];
}
Вот действие по переносу на другой контроллер представления:
- (IBAction)doHelp:(id)sender{
NSLog(@"help button pressed");
TutorialViewController *sampleView = [[[TutorialViewController alloc] init] autorelease];
[sampleView setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal];
[self presentModalViewController:sampleView animated:YES];
}
спасибо за любую помощь.