{"action":"created","issue":{"url":"https://api.github.com/repos/imgly/imgly-sdk-ios/issues/22","labels_url":"https://api.github.com/repos/imgly/imgly-sdk-ios/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/imgly/imgly-sdk-ios/issues/22/comments","events_url":"https://api.github.com/repos/imgly/imgly-sdk-ios/issues/22/events","html_url":"https://github.com/imgly/imgly-sdk-ios/issues/22","id":85459390,"number":22,"title":"Segue and using completion block","user":{"login":"chrisr22","id":6283166,"avatar_url":"https://avatars.githubusercontent.com/u/6283166?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisr22","html_url":"https://github.com/chrisr22","followers_url":"https://api.github.com/users/chrisr22/followers","following_url":"https://api.github.com/users/chrisr22/following{/other_user}","gists_url":"https://api.github.com/users/chrisr22/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisr22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisr22/subscriptions","organizations_url":"https://api.github.com/users/chrisr22/orgs","repos_url":"https://api.github.com/users/chrisr22/repos","events_url":"https://api.github.com/users/chrisr22/events{/privacy}","received_events_url":"https://api.github.com/users/chrisr22/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-05T07:18:48Z","updated_at":"2015-06-05T10:03:24Z","closed_at":null,"body":"I know you can set the completion block of the editor (to be used without the camera)\r\n\r\n\tfunc callEditorViewController() {\r\n\t    var editorViewController = IMGLYMainEditorViewController()\r\n\t    editorViewController.highResolutionImage = image\r\n\t    editorViewController.initialFilterType = .None\r\n\t    editorViewController.initialFilterIntensity = 0.5\r\n\t    editorViewController.completionBlock = editorCompletionBlock\r\n\t}\r\n\r\nbut is there any way to set the completion block of the editor and still use the camera view controller?\r\n\r\nI tried to make a camera completion block to pass the image to the editor view controller: \r\n\r\n\tfunc cameraCompletionBlock(image: UIImage?) {\r\n        let editorViewController = IMGLYMainEditorViewController()\r\n        editorViewController.highResolutionImage = image\r\n        if let cameraController = cameraController {\r\n            editorViewController.initialFilterType = cameraController.effectFilter.filterType\r\n            editorViewController.initialFilterIntensity = cameraController.effectFilter.inputIntensity\r\n        }\r\n        editorViewController.completionBlock = editorCompletionBlock\r\n        \r\n        let navigationController = IMGLYNavigationController(rootViewController: editorViewController)\r\n        navigationController.navigationBar.barStyle = .Black\r\n        navigationController.navigationBar.translucent = false\r\n        navigationController.navigationBar.titleTextAttributes = [ NSForegroundColorAttributeName : UIColor.whiteColor() ]\r\n        \r\n        self.presentViewController(navigationController, animated: true, completion: nil)\r\n    }\r\n\r\nbut calling the editor completion block, which has a push segue, does not pull up the new view controller which will have the image? I know I did not pass the image yet, but that is because I cannot even get the new view controller to open up (however, NSLogs in the new view controller are working for some reason)\r\n\r\n\tfunc editorCompletionBlock(result: IMGLYEditorResult, image: UIImage?) {\r\n        if let image = image where result == .Done {\r\n            NSLog(\"done\")\r\n            self.performSegueWithIdentifier(\"pushPhoto\", sender: self)\r\n        } else {\r\n            NSLog(\"Cancelled\")\r\n            var cameraViewController = IMGLYCameraViewController()\r\n            cameraViewController.completionBlock = cameraCompletionBlock\r\n            \r\n            appDelegate.window?.rootViewController = cameraViewController\r\n        }\r\n    }\r\n    \r\n    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject!) {\r\n        if segue.identifier == \"pushPhoto\" {\r\n            let secondViewController = segue.destinationViewController as! viewPhotoVC\r\n            \r\n           self.presentViewController(secondViewController, animated: true, completion: nil)\r\n        }\r\n    }\r\n\r\nIs there an easier way to deal with passing the photo and transitioning from the editor view controller to another view controller?"},"comment":{"url":"https://api.github.com/repos/imgly/imgly-sdk-ios/issues/comments/109246725","html_url":"https://github.com/imgly/imgly-sdk-ios/issues/22#issuecomment-109246725","issue_url":"https://api.github.com/repos/imgly/imgly-sdk-ios/issues/22","id":109246725,"user":{"login":"sascha","id":895505,"avatar_url":"https://avatars.githubusercontent.com/u/895505?v=3","gravatar_id":"","url":"https://api.github.com/users/sascha","html_url":"https://github.com/sascha","followers_url":"https://api.github.com/users/sascha/followers","following_url":"https://api.github.com/users/sascha/following{/other_user}","gists_url":"https://api.github.com/users/sascha/gists{/gist_id}","starred_url":"https://api.github.com/users/sascha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sascha/subscriptions","organizations_url":"https://api.github.com/users/sascha/orgs","repos_url":"https://api.github.com/users/sascha/repos","events_url":"https://api.github.com/users/sascha/events{/privacy}","received_events_url":"https://api.github.com/users/sascha/received_events","type":"User","site_admin":false},"created_at":"2015-06-05T10:03:24Z","updated_at":"2015-06-05T10:03:24Z","body":"I don't see anything that's wrong with your code. Is the view controller that implements `func editorCompletionBlock(result: IMGLYEditorResult, image: UIImage?)` loaded from a storyboard file (i.e. is `self.storyboard != nil`)?"}}