Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
pikacode committed Nov 1, 2017
1 parent c987dae commit 3e70924
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions EBBannerView/Classes/EBBannerViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
@interface EBBannerViewController : UIViewController

+(void)setSupportedInterfaceOrientations:(UIInterfaceOrientationMask)orientations;
+(void)setStatusBarHidden:(BOOL)hidden;

@end
9 changes: 9 additions & 0 deletions EBBannerView/Classes/EBBannerViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions EBBannerView/Classes/EBBannerWindow.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Binary file not shown.

0 comments on commit 3e70924

Please sign in to comment.