美文网首页
打开系统相册崩溃解决(iPad)

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

作者: 雨雪霏霏why | 来源:发表于2016-12-05 15:34 被阅读177次
    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];
            }

    相关文章

      网友评论

          本文标题:打开系统相册崩溃解决(iPad)

          本文链接:https://www.haomeiwen.com/subject/xhakmttx.html