CustomWindow.m 696 B

123456789101112131415161718192021222324252627282930
  1. //
  2. // CustomWindow.m
  3. // AmrConvertAndRecord
  4. //
  5. // Created by Jeans on 3/29/13.
  6. // Copyright (c) 2013 Jeans. All rights reserved.
  7. //
  8. #import "CustomWindow.h"
  9. @implementation CustomWindow
  10. - (id)initWithFrame:(CGRect)frame
  11. {
  12. self = [super initWithFrame:frame];
  13. if (self) {
  14. // Initialization code
  15. }
  16. return self;
  17. }
  18. -(void)sendEvent:(UIEvent *)event {
  19. if (event.type == UIEventTypeTouches) {//发送一个名为‘nScreenTouch’(自定义)的事件
  20. [g_notify postNotification:[NSNotification notificationWithName:@"nScreenTouch" object:nil userInfo:[NSDictionary dictionaryWithObject:event forKey:@"data"]]];
  21. }
  22. [super sendEvent:event];
  23. }
  24. @end