Resim seçiciden bir görüntü seçtikten sonra bir modal görüntü denetleyicisi oluşturmaya çalışıyorum.iOS: Uyarı: Bir sunum devam ederken <ViewController> üzerindeki <ModalViewController> öğesini sunmaya çalışın
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
NSLog(@"Picker has returned");
[self dismissModalViewControllerAnimated:YES];
// TODO: make this all threaded?
// crop the image to the bounds provided
img = [info objectForKey:UIImagePickerControllerOriginalImage];
NSLog(@"orig image size: %@", [[NSValue valueWithCGSize:img.size] description]);
// save the image, only if it's a newly taken image:
if([picker sourceType] == UIImagePickerControllerSourceTypeCamera){
UIImageWriteToSavedPhotosAlbum(img, nil, nil, nil);
}
// self.image_View.image=img;
//self.image_View.contentMode = UIViewContentModeScaleAspectFit;
ModalViewController *sampleView = [[ModalViewController alloc] init];
[self presentModalViewController:sampleView animated:YES];
}
Ancak, uyarı alabilirsiniz: Ben kodu kullanabilirsiniz
Warning: Attempt to present <ModalViewController: 0x7561600> on <ViewController: 0x75a72e0> while a presentation is in progress!
ve kalıcı görünüm görünmüyor.
Neyi yanlış yapıyorum?
** TAM ÇÖZÜM **, John cevap: http://stackoverflow.com/questions/14453001/meaning-of-warning-while- a-presentation-devam ediyor – Fattie