打开系统相册崩溃解决(iPad)

2016-12-05  本文已影响177人  雨雪霏霏why
imagePicker.sourceType = [imagePicker setAllowsEditing:NO];
imagePicker.delegate = self;
 UINavigationBar *bar = imagePicker.navigationBar;
  [bar setTintColor:HEXCOLOR(0x444444)];```

        if (UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPad) {
            //iPad 版本代码;
            UIPopoverController * popover = [[UIPopoverController alloc]initWithContentViewController:imagePicker];
            [popover presentPopoverFromRect:CGRectMake(0, 0,self.width, 400) inView:self permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
            
        }
        else {
            //iPhone/iPod touch 版本代码;
            
            [self.viewController presentViewController:imagePicker animated:YES completion:NULL];
        }
上一篇下一篇

猜你喜欢

热点阅读