Add notification for top will reset

This commit is contained in:
Mike Enriquez
2012-10-30 10:34:04 -04:00
parent 2bd7916a89
commit 8921914110
2 changed files with 7 additions and 0 deletions

View File

@@ -27,6 +27,9 @@ extern NSString *const ECSlidingViewTopDidAnchorLeft;
/** Notification that gets posted when the top view is anchored to the right side of the screen */
extern NSString *const ECSlidingViewTopDidAnchorRight;
/** Notification that gets posted when the top view will be centered on the screen */
extern NSString *const ECSlidingViewTopWillReset;
/** Notification that gets posted when the top view is centered on the screen */
extern NSString *const ECSlidingViewTopDidReset;

View File

@@ -14,6 +14,7 @@ NSString *const ECSlidingViewUnderLeftWillDisappear = @"ECSlidingViewUnderLeftW
NSString *const ECSlidingViewUnderRightWillDisappear = @"ECSlidingViewUnderRightWillDisappear";
NSString *const ECSlidingViewTopDidAnchorLeft = @"ECSlidingViewTopDidAnchorLeft";
NSString *const ECSlidingViewTopDidAnchorRight = @"ECSlidingViewTopDidAnchorRight";
NSString *const ECSlidingViewTopWillReset = @"ECSlidingViewTopWillReset";
NSString *const ECSlidingViewTopDidReset = @"ECSlidingViewTopDidReset";
@interface ECSlidingViewController()
@@ -358,6 +359,9 @@ NSString *const ECSlidingViewTopDidReset = @"ECSlidingViewTopDidRese
- (void)resetTopView
{
dispatch_async(dispatch_get_main_queue(), ^{
[[NSNotificationCenter defaultCenter] postNotificationName:ECSlidingViewTopWillReset object:self userInfo:nil];
});
[self resetTopViewWithAnimations:nil onComplete:nil];
}