I am new to iOS development. I created a segue from one VC to another VC. It is set as "Show(eg Push)"
However, swipe back capability is not working. Also, I have a custom back button. I have set a listener to it, which also does nothing:
@IBAction func backClicked(sender: AnyObject)
{
self.navigationController?.popViewControllerAnimated(true)
}
What is wrong? I want back button to work and swipe back capability to also work. I don't need Navigation Bar.
Just Embed In navigation controller to your root view controller and hide your navigation bar if you don't need it. And your button action will work.
In my case, my project used split view controller. I removed it, and popViewController
worked.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.