Last active
August 29, 2015 14:11
-
-
Save djromero/e433aefc0e0d9f792480 to your computer and use it in GitHub Desktop.
Aspects snippets [https://github.com/steipete/Aspects]
This file contains hidden or 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
[self.collectionView aspect_hookSelector:@selector(touchesBegan:withEvent:) | |
withOptions:AspectPositionAfter | |
usingBlock:^(id<AspectInfo> aspectInfo, NSSet *touches, UIEvent *event) { | |
NSLog(@"touchesBegan:withEvent:\n%@\n%@\n", touches, event); | |
} | |
error:&error]; | |
[self aspect_hookSelector:@selector(pointInside:withEvent:) | |
withOptions:AspectPositionAfter | |
usingBlock:^(id info, CGPoint pt, UIEvent *event){ | |
NSLog(@"Point: %@\n%@", NSStringFromCGPoint(pt), event); | |
} | |
error:nil]; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment