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

Present ViewController from the ImagePickerController #88

Closed
julianpomper opened this issue Jan 13, 2016 · 2 comments
Closed

Present ViewController from the ImagePickerController #88

julianpomper opened this issue Jan 13, 2016 · 2 comments

Comments

@julianpomper
Copy link

How can I present a ViewController from the ImagePickerController?
My code:

func wrapperDidPress(images: [UIImage]) {

        let images = imageAssets
        Variablen.currentCreateImages = images
        NSNotificationCenter.defaultCenter().postNotificationName("updatePageView", object: nil)

//help
        let view = Variablen.createViewsStoryboard.instantiateViewControllerWithIdentifier("CustomImagesPicker") as! CustomImagesPicker
        self.presentViewController(view, animated: true, completion: nil)

    }

I get this Error :
Attempt to present ... on ... whose view is not in the window hierarchy!

@RamonGilabert
Copy link
Contributor

Hey @julianpomper.

You are calling the delegate method, so I guess this is in your previous view controller. If you do this:

imagePickerController.presentViewController(controller, animated: true, completion: nil)

It should do the work already.

@julianpomper
Copy link
Author

Oh yes thanks!

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