标签:
- (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;
标签:
原文地址:http://www.cnblogs.com/yintingting/p/4544429.html