i've been trying to hide a bar button that keeps appearing under my "Menu" barbuttonitem
You can see under the "Menu" button it says "Atras" which was a button from the last viewcontroller
Can you try to check if the bar button item is not nil. If it is not, set it to nil first and then add the intended bar button item there.
In my case, I just disabled edge swiping in my UINavigationController
to prevent this from happening.
self.navigationController?.interactivePopGestureRecognizer?.enabled = false
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.