From 87c25eb82823c0c1a4c8afc16ddb5d8ded384d8c Mon Sep 17 00:00:00 2001 From: Sanjay Sahani Date: Tue, 30 Sep 2014 17:55:55 -0400 Subject: [PATCH] day button too sensitive on scroll MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit changed the day buttons action event to UIControlEventTouchUpInside that way the day button doesn’t get selected on scroll gesture. --- TimesSquare/TSQCalendarRowCell.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TimesSquare/TSQCalendarRowCell.m b/TimesSquare/TSQCalendarRowCell.m index 0cf087b..0b21b10 100644 --- a/TimesSquare/TSQCalendarRowCell.m +++ b/TimesSquare/TSQCalendarRowCell.m @@ -56,7 +56,7 @@ - (void)createDayButtons; NSMutableArray *dayButtons = [NSMutableArray arrayWithCapacity:self.daysInWeek]; for (NSUInteger index = 0; index < self.daysInWeek; index++) { UIButton *button = [[UIButton alloc] initWithFrame:self.contentView.bounds]; - [button addTarget:self action:@selector(dateButtonPressed:) forControlEvents:UIControlEventTouchDown]; + [button addTarget:self action:@selector(dateButtonPressed:) forControlEvents:UIControlEventTouchUpInside]; [dayButtons addObject:button]; [self.contentView addSubview:button]; [self configureButton:button];