Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions REFrostedViewController/REFrostedViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ typedef NS_ENUM(NSInteger, REFrostedViewControllerLiveBackgroundStyle) {
@property (strong, readonly, nonatomic) UIPanGestureRecognizer *panGestureRecognizer;
@property (assign, readwrite, nonatomic) BOOL panGestureEnabled;
@property (assign, readwrite, nonatomic) REFrostedViewControllerDirection direction;
@property (assign, readonly, nonatomic) BOOL isMenuOpen;

/**
* The backgroundFadeAmount is how much the backgound view fades when the menu
Expand Down
11 changes: 11 additions & 0 deletions REFrostedViewController/REFrostedViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,14 @@ - (void)setMenuViewSize:(CGSize)menuViewSize
self.automaticSize = NO;
}

#pragma mark -
#pragma mark Getters

- (BOOL)isMenuOpen
{
return _visible;
}

#pragma mark -

- (void)presentMenuViewController
Expand Down Expand Up @@ -203,6 +211,9 @@ - (void)presentMenuViewControllerWithAnimatedApperance:(BOOL)animateApperance
- (void)hideMenuViewControllerWithCompletionHandler:(void(^)(void))completionHandler
{
if (!self.visible) {//when call hide menu before menuViewController added to containerViewController, the menuViewController will never added to containerViewController
if (completionHandler) {
completionHandler();
}
return;
}
if (!self.liveBlur) {
Expand Down