I know there are lots of postings about this but I have tried everything and nothing has worked. So I have tried to pass an object between two view controllers, to a DBKIngredi
Are you sure that segue.destinationViewController
is a UINavigationController
? It seems like it's just a DBKIngredientsViewController
so this should work:
DBKIngredientsViewController *controller = (DBKIngredientsViewController *)segue.destinationViewController
Also if DBKViewController
already has a navigation controller then you do not need a second one if you are pushing DBKIngredientsViewController
. You would only need a second one if you are modally displaying DBKIngredientsViewController
.