mirror of
https://github.com/zhigang1992/ECSlidingViewController.git
synced 2026-04-23 21:00:11 +08:00
Add notification for top will reset
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user