I have made a view clickable with a tap gesture recognizer, which is working just fine. But I want to highlight the view when the touch happens en remove it when the touch e
It might be too late. But this will also help you, if you strictly want to use Gesture recognizer.
UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc]
initWithTarget:self
action:@selector(refresh:)];
longPress.minimumPressDuration = 0.0;
- (IBAction)refresh:(UILongPressGestureRecognizer *)sender {
if(self.currentStatus == NODATA){
if(sender.state == UIGestureRecognizerStateBegan){
NSLog(@"Began!");
[self.dashboardViewController.calendarContainer state:UIViewContainerStatusSELECTED];
}
if (sender.state == UIGestureRecognizerStateEnded){
NSLog(@"%@", @"Ended");
[self.dashboardViewController.calendarContainer state:UIViewContainerStatusNORMAL];
}
[self setState:REFRESHING data:nil];
}
}