Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setImageForMHGalleryItem:imageType:successBlock: unrecognized #35

Closed
FlorianBasso opened this issue Jun 5, 2014 · 9 comments
Closed

Comments

@FlorianBasso
Copy link

Hi,

I try to display an image with your gallery but i always have this error :
-[UIImageView setImageForMHGalleryItem:imageType:successBlock:]: unrecognized selector sent to instance

My code looks like this :
capture decran 2014-06-05 a 18 32 11

Any idea how I can fix this issue please ?

@mariohahn
Copy link
Owner

How do you integrate the lib? Pods?

@FlorianBasso
Copy link
Author

I integrate with Pods with this line :
pod 'MHVideoPhotoGallery', '~> 1.6'

Now i create MHGalleryItem with this line for all my media/events :

 //CREATE GALLERY ITEM
                    MHGalleryItem *galleryItem = [[MHGalleryItem alloc]initWithURL:[eventMedia.info objectForKey:@"url"]
                                                                       galleryType:([[eventMedia.info objectForKey:@"type"] isEqualToString: ALAssetTypePhoto] ?   MHGalleryTypeImage:MHGalleryTypeVideo )];
                    [self.galleryItemsArray addObject:galleryItem];

But if I click on a photo or video I still have this error :

-[UIImageView setImageForMHGalleryItem:imageType:successBlock:]: unrecognized selector sent to instance

@mariohahn
Copy link
Owner

Is it working if you hardcode something like this:

MHGalleryItem *landschaft9 = [MHGalleryItem itemWithURL:@"http://p1.pichost.me/i/40/1638707.jpg"
galleryType:MHGalleryTypeImage];

@FlorianBasso
Copy link
Author

I already tried but i had the same error. I also tried to add #import "UIImageView+MHGallery.h" in my UIViewController but it doesn't work neither.

@mariohahn
Copy link
Owner

I can't find the error, it works perfect for me on all my Projects.
But you are able to run the Example Code?
Can you send me the stacktrace?

@FlorianBasso
Copy link
Author

Yes, I can run the Example Code on my Device and on the Simulator.
Stack Trace looks like :

capture decran 2014-06-06 a 12 35 38

@FlorianBasso
Copy link
Author

I add the lib without Cocoapod and now it's working :s

@FlorianBasso
Copy link
Author

However, when i click on a cell with a video, I got this error :

+[UIImage sd_imageWithData:]: unrecognized selector sent to class

@FlorianBasso
Copy link
Author

Well, I also add SDWebImage without Cocoapod and it's working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants