// // CustomWindow.m // AmrConvertAndRecord // // Created by Jeans on 3/29/13. // Copyright (c) 2013 Jeans. All rights reserved. // #import "CustomWindow.h" @implementation CustomWindow - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { // Initialization code } return self; } -(void)sendEvent:(UIEvent *)event { @try { if (event.type == UIEventTypeTouches) {//发送一个名为‘nScreenTouch’(自定义)的事件 [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:@"nScreenTouch" object:nil userInfo:[NSDictionary dictionaryWithObject:event forKey:@"data"]]]; } [super sendEvent:event]; } @catch (NSException *exception) { NSLog(@"%@",exception); } @finally { NSLog(@"@finally"); } } @end