Skip to content

Commit

Permalink
Added unfix status bar functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
arturdev committed Feb 18, 2014
1 parent 666d3a8 commit 64eb780
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
11 changes: 8 additions & 3 deletions AMSlideMenu/AMSlideMenuMainViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,20 @@ typedef enum {
- (CGFloat)maxDarknessWhileRightMenu;

/**
* Override this method if you want to fix status bar with custom view
* Call this method if you want to fix status bar with custom view
* @method
* Works ONLY for iOS > 7.0 !
* @method
* Default value is nil
* @param UIView* that will be shown as background of status bar. Must be 20px height.
*/
- (void)fixStatusBarWithView:(UIView *)view;

/**
* Call this method if you want to uunfix status bar with custom view
* @method
* Works ONLY for iOS > 7.0 !
*/
- (void)unfixStatusBarView;

#pragma mark - Methods

#pragma mark -- Actions
Expand Down
6 changes: 6 additions & 0 deletions AMSlideMenu/AMSlideMenuMainViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,12 @@ - (void)fixStatusBarWithView:(UIView *)view
}
}

- (void)unfixStatusBarView
{
[self.statusBarView removeFromSuperview];
self.statusBarView = nil;
}

- (void)enableGestures
{
self.tapGesture.enabled = YES;
Expand Down
4 changes: 4 additions & 0 deletions AMSlideMenuDemo-with Storyboard/AMSlideMenu/Slide1VC.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,9 @@ - (void)viewWillAppear:(BOOL)animated
[[self mainSlideMenu] fixStatusBarWithView:view];
}

- (void)dealloc
{
[[self mainSlideMenu] unfixStatusBarView];
}

@end

0 comments on commit 64eb780

Please sign in to comment.