码迷,mamicode.com
首页 > 其他好文 > 详细

ELCImagePickerController 的集成

时间:2015-04-14 11:07:50      阅读:135      评论:0      收藏:0      [点我收藏+]

标签:

  • 1,  将文件夹ELCImagePicker拷贝到工程中
  • 2,添加系统库AssetsLibrary.framework
  • 3,  添加系统库MobileCoreServices
  • 4,在头文件中加入引用#import "ELCImagePickerHeader.h"
  • 5,在头文件中加入delegate的引用ELCImagePickerControllerDelegate
  • 6,  替换之前的UIImagePickerController相关的初始化代码为

        ELCImagePickerController *elcPicker = [[ELCImagePickerController alloc] initImagePicker];
        elcPicker.maximumImagesCount = 100; //Set the maximum number of images to select to 100
        elcPicker.returnsOriginalImage = YES; //Only return the fullScreenImage, not the fullResolutionImage
        elcPicker.returnsImage = YES; //Return UIimage if YES. If NO, only return asset location information
        elcPicker.onOrder = YES; //For multiple image selection, display and return order of selected images
        elcPicker.mediaTypes = @[(NSString *)kUTTypeImage, (NSString *)kUTTypeMovie]; //Supports image and movie types
        elcPicker.imagePickerDelegate = self;
        [self.navigationController presentViewController:elcPicker animated:YES completion:nil];

  • 7, 屏蔽之前的didFinishPickingMediaWithInfo 和 imagePickerControllerDidCancel而替换成

  - (void)elcImagePickerControllerDidCancel:(ELCImagePickerController *)picker
    {
        [self dismissViewControllerAnimated:YES completion:nil];
    }

  - (void)elcImagePickerController:(ELCImagePickerController *)picker didFinishPickingMediaWithInfo:(NSArray *)info{
    
        [picker dismissViewControllerAnimated:YES completion:nil];
    }

 

ELCImagePickerController 的集成

标签:

原文地址:http://www.cnblogs.com/lisa090818/p/4424322.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!