Skip to content
This repository has been archived by the owner on Jan 14, 2018. It is now read-only.

Notifications Removed... so what now!? #401

Open
GantMan opened this issue Nov 22, 2014 · 4 comments
Open

Notifications Removed... so what now!? #401

GantMan opened this issue Nov 22, 2014 · 4 comments

Comments

@GantMan
Copy link

GantMan commented Nov 22, 2014

Was using this: http://stackoverflow.com/questions/25857463/how-can-i-darken-the-ecslidingviewcontroller-view-controller-in-the-transition

But now that the notifications are removed in the latest, what can I do?

@paulofierro
Copy link

As @biznickman and @GantMan pointed out in #246 there are ways of closing the menu which don't let you pass a completion block.

I found that the easiest way to go was to subclass EFSlidingViewController and post my own notification at the end of completeTransition: like so:

- (void)completeTransition:(BOOL)didComplete
{
    [super completeTransition:didComplete];

    if (self.currentTopViewPosition == ECSlidingViewControllerTopViewPositionCentered)
    {
        [[NSNotificationCenter defaultCenter] postNotificationName:kNotificationMenuClosed object:nil];
    }
}

@Monserg
Copy link

Monserg commented Jul 18, 2015

Hi, paulofierro.
Thanks for you solution.
I use it in my project to notify event "swipe complete - left position".

@paulofierro
Copy link

@Monserg: glad to hear it 👍 :)

@diegomazzone
Copy link

Great @paulofierro :). I can't understand how this is not implemented by default

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants