Please try to remove your view controller from navigation stack before you select another tab.
self.navigationController!.viewControllers.removeAll() // to remove all view controllers from stack
self.navigationController?.viewControllers.remove(at: "insert here a index") // to remove specific view controller - enter index
Hope it works
Cheer :)
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.