相关疑难解决方法(0)

didFinishPickingMediaWithInfo返回零照片

我正在努力捕获使用4.0返回的图像

- (void)imagePickerController:(UIImagePickerController *)picker 
    didFinishPickingMediaWithInfo:(NSDictionary *)info
{
    [[picker parentViewController] dismissModalViewControllerAnimated:YES]; 

    // MediaType can be kUTTypeImage or kUTTypeMovie. If it's a movie then you
    // can get the URL to the actual file itself. This example only looks for images.
    //   
    NSString* mediaType = [info objectForKey:UIImagePickerControllerMediaType];
    // NSString* videoUrl = [info objectForKey:UIImagePickerControllerMediaURL];

    // Try getting the edited image first. If it doesn't exist then you get the
    // original image.
    //
    if (CFStringCompare((CFStringRef) mediaType,  kUTTypeImage, 0) == kCFCompareEqualTo) {               
        UIImage* picture …
Run Code Online (Sandbox Code Playgroud)

iphone camera uiimagepickercontroller uiimage

30
推荐指数
3
解决办法
4万
查看次数

标签 统计

camera ×1

iphone ×1

uiimage ×1

uiimagepickercontroller ×1