FLEXWindow.m 765 B

1234567891011121314151617181920212223242526272829303132333435
  1. //
  2. // FLEXWindow.m
  3. // Flipboard
  4. //
  5. // Created by Ryan Olson on 4/13/14.
  6. // Copyright (c) 2014 Flipboard. All rights reserved.
  7. //
  8. #import "FLEXWindow.h"
  9. @implementation FLEXWindow
  10. - (id)initWithFrame:(CGRect)frame
  11. {
  12. self = [super initWithFrame:frame];
  13. if (self) {
  14. self.backgroundColor = [UIColor clearColor];
  15. // Some apps have windows at UIWindowLevelStatusBar + n.
  16. // At CGFLOAT_MAX, we should be safe.
  17. self.windowLevel = CGFLOAT_MAX;
  18. }
  19. return self;
  20. }
  21. - (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event
  22. {
  23. BOOL pointInside = NO;
  24. if ([self.eventDelegate shouldHandleTouchAtPoint:point]) {
  25. pointInside = [super pointInside:point withEvent:event];
  26. }
  27. return pointInside;
  28. }
  29. @end