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

UIImagePickerController

时间:2015-06-01 18:12:36      阅读:86      评论:0      收藏:0      [点我收藏+]

标签:

- (void)keyboardToolbar:(KeyboardToolbar *)tool didClickBtn:(KeyboardToolbarButtonType)type{

    

    if (type == KeyboardToolbarButtonTypeAlbum) {

        

        UIImagePickerController *picker = [[UIImagePickerController alloc]init];

        

        picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;

        picker.delegate = self;

        

        [self presentViewController:picker animated:YES completion:nil];

       

       

    

    }

    

    

    

}

 

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{

    

    [picker dismissViewControllerAnimated:YES completion:nil];

 

    UIImage *image = info[UIImagePickerControllerOriginalImage];

    

    self.imgView.image = image;

   

    self.navigationItem.rightBarButtonItem.enabled = YES;

    

    

 

UIImagePickerController

标签:

原文地址:http://www.cnblogs.com/yintingting/p/4544429.html

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