Swiping half-way back messes up Navigation Bar

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 :slight_smile:

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:

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 :wink:

Oh, totally forgot to mention what is involved…
If I remove the “Toolbar Buttons” (on the bottom, on MasterView), all is fine. It’s just that I (obviously) don’t want to remove them :wink:
Anyway - somehow the “bottom Toolbar buttons” are involved in the Navigation Bar messing up (on the top, in the area with the LeftBarButtonItem and “BackButtonItem”).

Which is weird…

There has to be a way or workaround to get this working (in a way that supports all devices, layouts - using a SplitViewController)… Sure, a “simple iOS app” with Master<->Detail (no SplitViewController for iPad, large iPhones in landscape) works fine, too.