popViewController(animated: true) not working

let _ = navigationController?.popViewController(animated: true) is ignored however when I use picker.dismiss(animated: true, completion: nil) the controller is dismissed properly.

That sounds like you used a “present modally” segue rather than a “show” segue.

I’m a little unclear when this code runs. I understand what the popViewController is doing, just not when. We assign the output to a wildcard but then do nothing with it? To me it seems like just writing the code on the right side of the “=” would/should do the pop (of course it doesn’t, I tried it :grin: ).

Can you explain? Thanks!

I think let _= just gets rid of the warning message. navigationController?.popViewController(animated:) returns the view controller popped off the viewControllers stack. If it’s not used, a warning message will show.

popViewController works only for the second tap, but gets the image from my first