In my leisure time I’ve once created an iOS app Expense Tool. That’s been in 2010, with iPhoneOS 3.
Nowadays I don’t find much time for that - just trying to keep it working. Which means that every year with every iOS update Apple is breaking functionality that once worked fine
So it hasn’t been a surprise to find and fix various bugs in this app once I’ve updated to iOS 15.
There is one remaining, which I couldn’t figure out so far…
The app is using a SplitViewController, which handles Portrait/Landscape on iPhone/iPad - and supports the various devices and split-screen usages on iPad. That’s why there are several “(embed in) Navigation Controllers” involved.
The issue I am seeing is on iPhone:
- Main ViewController
- Select an item → pushes to DetailViewController
So far, so good. If the user taps “back”, or “swipes back” (from the left-middle into the screen → which is the same as tap the “back button” on top-left in NavigationBar). All fine.
But not if the user does this on the “DetailViewController”:
- swipe only half-way back (so you see part of the Main ViewController), then release to be back in DetailViewController
- now navigate back to MasterViewController
And oops… the NavigationBar on top is messed up. The “Back” from DetailView is still there, overlapping the NavBar-Buttons. No way to get rid of them, apart from force-quitting the app.
Screen Recording: SwipeBackIssue.mp4
Example Project (Objective C): SwipeBackIssue.zip
If someone would like to try this - I’ll leave the example project on my Dropbox for a while.
It seems that others have encountered similar issues:
- ios - SwiftUI navigation bar items going haywire when swipe back fails - Stack Overflow
- SwiftUI navigation bar items going… | Apple Developer Forums
While I’m seeing a similar (or the same?) issue, I can’t figure out how to work around it… The issues I’ve found searching all talk about Swift, and I don’t see how what’s suggested there could possibly work with this Objective C app, too…
Ideas and workarounds are welcome