diff --git a/EBBannerView/Classes/EBBannerViewController.h b/EBBannerView/Classes/EBBannerViewController.h index 2710079..b7dfaf1 100644 --- a/EBBannerView/Classes/EBBannerViewController.h +++ b/EBBannerView/Classes/EBBannerViewController.h @@ -11,5 +11,6 @@ @interface EBBannerViewController : UIViewController +(void)setSupportedInterfaceOrientations:(UIInterfaceOrientationMask)orientations; ++(void)setStatusBarHidden:(BOOL)hidden; @end diff --git a/EBBannerView/Classes/EBBannerViewController.m b/EBBannerView/Classes/EBBannerViewController.m index ce9ab14..4138f50 100644 --- a/EBBannerView/Classes/EBBannerViewController.m +++ b/EBBannerView/Classes/EBBannerViewController.m @@ -29,8 +29,17 @@ +(void)setSupportedInterfaceOrientations:(UIInterfaceOrientationMask)orientation supportedOrientations = orientations; } ++(void)setStatusBarHidden:(BOOL)hidden{ + statusBarHidden = hidden; +} + -(UIInterfaceOrientationMask)supportedInterfaceOrientations{ return supportedOrientations; } +static BOOL statusBarHidden; +-(BOOL)prefersStatusBarHidden{ + return statusBarHidden; +} + @end diff --git a/EBBannerView/Classes/EBBannerWindow.m b/EBBannerView/Classes/EBBannerWindow.m index 0bcc752..258db7a 100644 --- a/EBBannerView/Classes/EBBannerWindow.m +++ b/EBBannerView/Classes/EBBannerWindow.m @@ -25,6 +25,7 @@ +(instancetype)sharedWindow{ EBBannerViewController *vc = [EBBannerViewController new]; [EBBannerViewController setSupportedInterfaceOrientations:UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscape]; + [EBBannerViewController setStatusBarHidden:NO]; vc.view.backgroundColor = [UIColor clearColor]; vc.view.frame = CGRectMake(0, 0, ScreenWidth, ScreenHeight); sharedWindow.rootViewController = vc; diff --git a/demo/demo.xcworkspace/xcuserdata/wxc.xcuserdatad/UserInterfaceState.xcuserstate b/demo/demo.xcworkspace/xcuserdata/wxc.xcuserdatad/UserInterfaceState.xcuserstate index 3923a8b..d75290e 100644 Binary files a/demo/demo.xcworkspace/xcuserdata/wxc.xcuserdatad/UserInterfaceState.xcuserstate and b/demo/demo.xcworkspace/xcuserdata/wxc.xcuserdatad/UserInterfaceState.xcuserstate differ