1

I override the - (void)sendEvent:(UIEvent *)event method of UIApplication to handle some touch event.

.h

@interface myUIApplication : UIApplication {

}

.m

@implementation myUIApplication

- (void)sendEvent:(UIEvent *)event {
    NSLog(@"a event catched");
    [super sendEvent:event];
}

@end

and I edit my File's Owner's class to myUIApplication in MainWindow.xib. But when I touch the screen There is no output like @"a event catched"

Is there some mistake I have?

Thanks!

Solskjaer
  • 175
  • 1
  • 11

1 Answers1

1

You will have to pass @"myUIApplication" to UIApplicationMain function. So it should be,

int retVal = UIApplicationMain(argc, argv, @"myUIApplication", nil);
Deepak Danduprolu
  • 44,595
  • 12
  • 101
  • 105