나는 모달 뷰를 표시하려면이 코드를 발견아이 패드
- (void)add:(id)sender {
// Create the root view controller for the navigation controller
// The new view controller configures a Cancel and Done button for the
// navigation bar.
RecipeAddViewController *addController = [[RecipeAddViewController alloc]
initWithNibName:@"RecipeAddView" bundle:nil];
addController.delegate = self;
// Create the navigation controller and present it modally.
UINavigationController *navigationController = [[UINavigationController alloc]
initWithRootViewController:addController];
[self presentModalViewController:navigationController animated:YES];
// The navigation controller is now owned by the current view controller
// and the root view controller is owned by the navigation controller,
// so both objects should be released to prevent over-retention.
[navigationController release];
[addController release];
}
내 질문이 코드를 (내가 buttonPress 방법에 배치거야)
구현합니까 어떻게헤더 파일에 아무 것도 정의해야합니까? 나를 혼란스럽게하는 비트는 apple on이 헤더 파일을 제공하지 않기 때문에 아무 것도 없어야하는지 알 수 없습니까?
이 코드는 RecipieAddViewController를 참조합니다. "UIViewController"로 무엇을 표현합니까?
헤더 파일에 위임자로 무엇을 넣을 까? 다른 곳에서는 이걸 설정해야합니까? 재산 같은 거요?
다른 방법이 있습니까?이 코드를 내 buttonPress 메서드에 복사하여 작동 시키려면 어떻게해야합니까?
모든 질문에 대해 죄송합니다.
대단히 감사합니다. 귀하의 답변은 훌륭했고 많이 정리되었습니다. :) – Dave