UIWindow+FHH.m 677 B

123456789101112131415161718192021222324252627282930
  1. //
  2. // UIWindow+FHH.m
  3. // flashServesCustomer
  4. //
  5. // Created by 002 on 16/6/27.
  6. // Copyright © 2016年 002. All rights reserved.
  7. //
  8. #import "UIWindow+FHH.h"
  9. static NSInteger kFpsLabelTag = 110213;
  10. @implementation UIWindow (FHH)
  11. - (void)layoutSubviews {
  12. [super layoutSubviews];
  13. for (NSUInteger i = 0; i < self.subviews.count; ++i) {
  14. UIView *view = self.subviews[self.subviews.count - 1 - i];
  15. if ([view isKindOfClass:[UILabel class]] && view.tag == kFpsLabelTag) {
  16. if (view == self.subviews.lastObject) {
  17. return;
  18. }
  19. [self bringSubviewToFront:view];
  20. return;
  21. }
  22. }
  23. }
  24. @end