0
하나의 탭이 일련의보기를 통해 이동하기 위해 탐색 컨트롤러를 사용하는 탭 막대 응용 프로그램이 있습니다. 마지막보기에는 UIImagePickerController를 제공하는 사진을 추가하는 버튼이 있습니다. 지금까지는 이미지를 선택하거나 작업을 취소했지만 이전 뷰는로드되지만 탭 막대는 표시되지 않습니다. 초급 뭔가를 놓치고있어 확신 해요,하지만 UIImagePickerController 제대로 해제하는 방법에 대한 제안을 많이 주시면 감사하겠습니다. 코드는 다음과 같습니다.UITabBarController에서 UIImagePickerController 닫기
ImagePickerViewController *aController = [[ImagePickerViewController alloc]; initWithNibName:@"ImagePickerViewController" bundle:[NSBundle mainBundle]];
[self presentModalViewController:aController animated:YES];
[aController release];
//viewDidLoad
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
imagePickerController = [[UIImagePickerController alloc] init];
imagePickerController.delegate = self;
if([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera]){
imagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera;
} else {
imagePickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
}
[window addSubview:imagePickerController.view];
//ImagePickerViewController imagePickerControllerDidCancel - FinalViewController is the last view in the stack controlled by a navigation controller which contains the button to present the UIImagePickerController
[picker dismissModalViewControllerAnimated:YES];
FinalViewController *aController = [[FinalViewController alloc initWithNibName:@"FinalViewController" bundle:[NSBundle mainBundle]];
[picker presentModalViewController:aController animated:YES];
[aController release];
이 문제는 직접적인 문제는 물론 모달 뷰 컨트롤러를 이해하는 데 큰 도움이되었습니다. 정말 고마워. – Dave
답변이 도움이된다면, 투표를 고려해 볼 수도 있고, 결정적으로 받아 들일 수도 있습니다 ;-) –