MJExampleWindow.m 689 B

123456789101112131415161718192021222324252627
  1. //
  2. // MJExampleWindow.m
  3. // MJRefreshExample
  4. //
  5. // Created by MJ Lee on 15/8/17.
  6. // Copyright (c) 2015年 小码哥. All rights reserved.
  7. //
  8. #import "MJExampleWindow.h"
  9. #import "MJTempViewController.h"
  10. @implementation MJExampleWindow
  11. static UIWindow *window_;
  12. + (void)show
  13. {
  14. window_ = [[UIWindow alloc] init];
  15. CGFloat width = 150;
  16. CGFloat x = [UIScreen mainScreen].bounds.size.width - width - 10;
  17. window_.frame = CGRectMake(x, 0, width, 25);
  18. window_.windowLevel = UIWindowLevelAlert;
  19. window_.hidden = NO;
  20. window_.alpha = 0.5;
  21. window_.rootViewController = [[MJTempViewController alloc] init];
  22. window_.backgroundColor = [UIColor clearColor];
  23. }
  24. @end