FLEXWindow.m 914 B

123456789101112131415161718192021222324252627282930313233343536
  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. // Using CGFLOAT_MAX works on 7.0 devieces but doesn't work in the 7.1 sim.
  17. // Hopefully status bar level + 1000.0 gets the job done. It works in the 7.1 sim.
  18. self.windowLevel = UIWindowLevelStatusBar + 1000.0;
  19. }
  20. return self;
  21. }
  22. - (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event
  23. {
  24. BOOL pointInside = NO;
  25. if ([self.eventDelegate shouldHandleTouchAtPoint:point]) {
  26. pointInside = [super pointInside:point withEvent:event];
  27. }
  28. return pointInside;
  29. }
  30. @end