Created
November 25, 2016 16:52
-
-
Save marianolatorre/112092c9da9bb7459c37fdc527728070 to your computer and use it in GitHub Desktop.
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
@interface MyWindow : UIWindow | |
@end | |
@implementation MyWindow | |
- (void)sendEvent:(UIEvent *)event { | |
[super sendEvent:event]; | |
NSSet *tocuhes = [event touchesForWindow:self]; | |
for(UITouch *touch in tocuhes){ | |
NSLog(@"XXXX For this view: %@",[touch.view class]); | |
UIView *view = [self hitTest:[touch locationInView:touch.view] withEvent:event]; | |
NSLog(@"YYYY This will receive: %@",[view class]); | |
} | |
} | |
@end | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
self.window = [[MyWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; | |
.... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment