I have two
Whay you are doing wrong is that you are pushing a view controller to a non existing navigation controller.
Basically when you say
self.navigationController? that returns
nil because there is no navigation controller. So the pop function doesn't get called.
In your case you have two options:
What you have to do is call
self.dismissViewControllerAnimated(true, completion: nil).