Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Within UINavigationController #2

Closed
tdunham02 opened this issue Oct 10, 2014 · 4 comments
Closed

Within UINavigationController #2

tdunham02 opened this issue Oct 10, 2014 · 4 comments

Comments

@tdunham02
Copy link

I've enjoyed working with your repo! Here's a small issue I encountered.

I have a main ViewController that is embedded in a UINavigationController. On that main view, I show an SCLAlertView, using:

SCLAlertView *alert = [[SCLAlertView alloc] init];
 [alert showSuccess:self.navigationController title:@"Title" subTitle:@"Text" closeButtonTitle:nil duration:2.0f];

For the root view controller, I use self.navigationController because I want the SCLAlert's shadow view to cover the title bar and buttons.

Now here comes the issue.

From that view, I present a modal view controller. When I dismiss that window the main view pushes a blank view controller for some reason. This ONLY happens if I've displayed the SCLAlert, THEN display the modal. It doesn't happen if I haven't displayed the SCLAlert before displaying the modal view controller.

@tdunham02
Copy link
Author

Solved it. I edited -(void)hideView in SCLAlertView.m to this:

- (void)hideView
{
    [UIView animateWithDuration:0.2f animations:^{
        self.shadowView.alpha = 0;
        self.view.alpha = 0;
    } completion:^(BOOL completed) {
        [self.shadowView removeFromSuperview];
        [self.view removeFromSuperview];
        [self removeFromParentViewController];  //<--------- ADDED THIS LINE
    }];
}

@dogo
Copy link
Owner

dogo commented Oct 10, 2014

Hahhah fast and furious! 👍

I can add this fix or you can create a PR with this fix

@tdunham02
Copy link
Author

I really love this repo, MUCH better than alert views and action sheets! You can just add the fix!

@dogo
Copy link
Owner

dogo commented Oct 10, 2014

Patched! Need a new release?

@dogo dogo closed this as completed Oct 10, 2014
dogo pushed a commit that referenced this issue Oct 19, 2014
dogo added a commit that referenced this issue May 29, 2015
restore interactivePopGesture to previous state #2
dogo pushed a commit that referenced this issue Nov 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants