Hi I\'m trying to present a viewcontroller and dismiss my current modal view but this code is not working
self.dismissViewControllerAnimated(true, completion
I think there is a mistake in your code where 'self' should be the presenting view controller to present 'vc', not 'vc' its self
Your code
self.dismissViewControllerAnimated(true, completion: {
let vc = self.storyboard?.instantiateViewControllerWithIdentifier("OrderViewController")
vc!.presentViewController(vc!, animated: true, completion: nil)
})
Try this
self.dismissViewControllerAnimated(true, completion: {
let vc = self.storyboard?.instantiateViewControllerWithIdentifier("OrderViewController")
self.presentViewController(vc!, animated: true, completion: nil)
})
hope this is helpful