2011-06-15 2 views
1

일부 터치 이벤트를 처리하기 위해 UIApplication - (void)sendEvent:(UIEvent *)event 메서드를 무시합니다. 내가 MainWindow.xib에에 myUIApplication 내 파일의 소유자의 클래스를 편집 .HUIApplication의 sendEvent 메서드에 대한 질문

@interface myUIApplication : UIApplication { 

} 

하는 .m

@implementation myUIApplication 

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

@end 

. 하지만 화면을 터치하면 @ "걸린 이벤트"와 같은 출력이 없습니다

내가 가지고있는 실수가 있습니까?

감사합니다.

답변

1

@"myUIApplication" ~ UIApplicationMain 함수를 전달해야합니다. 그래야합니다.

int retVal = UIApplicationMain(argc, argv, @"myUIApplication", nil);