Closed fvisticot closed 10 years ago
Hi, UIImageView by default have user interaction disabled. Enable that property.
Sent from my iPhone
On 16/ago/2014, at 23:31, fvisticot notifications@github.com wrote:
I try to add a gesture (UITapGestureRecognizer) callback on the small imageView but it is never called... Any idea ?
— Reply to this email directly or view it on GitHub.
I have tried this proposal but does not work… Any other idea ?
[imageView setContentMode:UIViewContentModeScaleAspectFill];
[imageView setClipsToBounds:YES];
[imageView setImage:[UIImage imageNamed:@"example"]];
[imageView.layer setBorderColor:[UIColor whiteColor].CGColor];
[imageView.layer setBorderWidth:2.0];
[imageView.layer setCornerRadius:imageView.frame.size.width/2.0];
[imageView setUserInteractionEnabled: YES];
UITapGestureRecognizer* recognizer = [[UITapGestureRecognizer alloc] initWithTarget: self action: @selector(userSettingsClicked:)];
recognizer.delegate=self;
[recognizer setNumberOfTapsRequired : 1];
[imageView addGestureRecognizer: recognizer];
+
(instancetype)initWithMainImage:(UIImage *)image { if(self = [super init]) { _image = [image copy]; _mainImageView = [UIImageView new]; [_mainImageView setUserInteractionEnabled: YES]; [_mainImageView setImage:_image]; _overView = [UIView new]; _tableView = [UITableView new]; }
return self; }
Le 16 Aug 2014 à 23:51, Matteo Gobbi notifications@github.com a écrit :
Closed #2.
— Reply to this email directly or view it on GitHub.
Oh sorry, the problem is that actually there is the tableView over that image. So the tap is captured by the table.
Do you plan to update the component ? If not, can you please provide any advice to make it works ?
Le 17 Aug 2014 à 02:02, Matteo Gobbi notifications@github.com a écrit :
Oh sorry, the problem is that actually there is the tableView over that image. So the tap is captured by the table.
— Reply to this email directly or view it on GitHub.
Hello Matteo, Sorry to disturb view again but did you have a solution / advice ? I really would like to use this nice component ?
Is there any other alternative to your control ? Tinder app is using this kind of component and I really like it (blur animation is really smooth)
Tx for your help
Fred
Le 17 Aug 2014 à 11:52, Fred Visticot fvisticot@gmail.com a écrit :
Do you plan to update the component ? If not, can you please provide any advice to make it works ?
Le 17 Aug 2014 à 02:02, Matteo Gobbi notifications@github.com a écrit :
Oh sorry, the problem is that actually there is the tableView over that image. So the tap is captured by the table.
— Reply to this email directly or view it on GitHub.
Hi,
unfortunately ATM i’m really busy and i can’t work on the component to study some way.
OK, no pb I found a workaround with gesture recognizer… not perfect but it works :) I show your component to some people, good feedback but it seems that blur effect is not perfect… (could be better as in Tinder app)
Regards
Fred
Le 22 Aug 2014 à 10:15, Matteo Gobbi notifications@github.com a écrit :
Hi,
unfortunately ATM i’m really busy and i can’t work on the component to study some way. — Reply to this email directly or view it on GitHub.
Hi, fvisticot
Could you describe your workaround?
Thanks
Fvisticot of you have a nice solution ask for a pull request please.
I try to add a gesture (UITapGestureRecognizer) callback on the small imageView but it is never called... Any idea ?