File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ //
2+ // DoraemonStatusBarViewController.h
3+ // AFNetworking
4+ //
5+ // Created by 张伟 on 2019/2/22.
6+ //
7+
8+ #import < UIKit/UIKit.h>
9+
10+ NS_ASSUME_NONNULL_BEGIN
11+
12+ @interface DoraemonStatusBarViewController : UIViewController
13+
14+ @end
15+
16+ NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change 1+ //
2+ // DoraemonStatusBarViewController.m
3+ // AFNetworking
4+ //
5+ // Created by 张伟 on 2019/2/22.
6+ //
7+
8+ #import " DoraemonStatusBarViewController.h"
9+
10+ @interface DoraemonStatusBarViewController ()
11+
12+ @end
13+
14+ @implementation DoraemonStatusBarViewController
15+
16+ - (void )viewDidLoad {
17+ [super viewDidLoad ];
18+ // Do any additional setup after loading the view.
19+ }
20+ - (BOOL )prefersStatusBarHidden
21+ {
22+ return NO ;
23+ }
24+ - (UIStatusBarStyle)preferredStatusBarStyle
25+ {
26+ return UIStatusBarStyleDefault;
27+ }
28+ /*
29+ #pragma mark - Navigation
30+
31+ // In a storyboard-based application, you will often want to do a little preparation before navigation
32+ - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
33+ // Get the new view controller using [segue destinationViewController].
34+ // Pass the selected object to the new view controller.
35+ }
36+ */
37+
38+ @end
Original file line number Diff line number Diff line change 1313#import " UIImage+Doraemon.h"
1414#import " DoraemonDefine.h"
1515#import " DoraemonHomeWindow.h"
16-
16+ # import " DoraemonStatusBarViewController.h "
1717@interface DoraemonEntryView ()
1818
1919@property (nonatomic , assign ) BOOL isOpen;
@@ -32,8 +32,15 @@ - (instancetype)init{
3232
3333 self.backgroundColor = [UIColor clearColor ];
3434 self.windowLevel = UIWindowLevelStatusBar + 100 .f ;
35- if (!self.rootViewController ) {
36- self.rootViewController = [[UIViewController alloc ] init ];
35+ NSString *version= [UIDevice currentDevice ].systemVersion ;
36+ if (version.doubleValue >=10.0 ) {
37+ if (!self.rootViewController ) {
38+ self.rootViewController = [[UIViewController alloc ] init ];
39+ }
40+ }else {
41+ if (!self.rootViewController ) {
42+ self.rootViewController = [[DoraemonStatusBarViewController alloc ] init ];
43+ }
3744 }
3845
3946 UIButton *entryBtn = [[UIButton alloc ] initWithFrame: self .bounds];
You can’t perform that action at this time.
0 commit comments