0
我有一個主要的UIViewController是在啓動時創建的,我只用於在2個不同的視圖控制器之間切換顯示模態。切換顯示2個不同的視圖控制器modaly
這裏我的代碼,不會開關:
- (void)imagePickerController:(UIImagePickerController*)picker didFinishPickingMediaWithInfo:(NSDictionary*)info {
[self dismissModalViewControllerAnimated:NO];
PreviewView *previewViewController = [[PreviewViewController alloc] initWithNibName:@"PreviewView" bundle:nil];
previewViewController.delegate = self;
[self presentModalViewController:previewViewController animated:YES];
[previewViewController release];
}
- (void)previewViewControllerdoneButtonPressed:(AnotherViewController*)controller {
[self dismissModalViewControllerAnimated:YES];
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
imagePicker.delegate = self;
[self presentModalViewController:imagePicker animated:NO];
[imagePicker release];
}
在第一種方法中,交換機的工作原理,但不是在第二位。我想知道爲什麼。
謝謝!
想知道,在dismissModalViewControllerAnimated:和presentModalViewController:方法中使用的'動畫'參數是否有任何原因在每種方法中都不相同? – 2010-01-22 17:56:00
是的,這是因爲我想讓previewView顯示/解除動畫,但不是imagePicker。謝謝! – Yoshi 2010-01-22 18:13:07