Created
April 15, 2013 04:08
-
-
Save MosheBerman/5385650 to your computer and use it in GitHub Desktop.
Calendar Touch handling
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event | |
{ | |
if ([[self headerView] pointInside:point withEvent:event]) | |
{ | |
return YES; | |
} | |
else if([[self table] pointInside:point withEvent:event]) | |
{ | |
return YES; | |
} | |
/* Highlight and select the appropriate cell */ | |
NSUInteger index = [self selectedIndex]; | |
for (CKCakeCell *cell in [self usedCells]) { | |
CGRect rect = [cell frame]; | |
if (CGRectContainsPoint(rect, point)) { | |
[cell setSelected]; | |
index = [cell index]; | |
} | |
else | |
{ | |
[cell setDeselected]; | |
} | |
} | |
[self setSelectedIndex:index]; | |
return [super pointInside:point withEvent:event]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment