I have a two view controllers, ViewControllerA
and ViewControllerB
, embedded in a UINavigationController
. ViewControllerA
has a UICollectionView
that displays images.
When the camera icon located at index 0 and the UICollectionViewCell
is selected, it should dismiss ViewControllerA
and display ViewControllerB
. And also, there is a ViewController
that presents ViewControllerA
modally
This is what I've done, but it only dismiss ViewControllerA
and nothing happens
let controller = self.storyboard?.instantiateViewControllerWithIdentifier("cameraViewController") as! UINavigationController
self.dismissViewControllerAnimated(true, completion: { () -> Void in
self.presentingViewController?.presentViewController(controller, animated: true, completion: nil)
})