UITabbarController issue on iOS 18

I'm building an app using UITabbarController with 2 tabs: screen A and B. When standing on tab B and I taps on tab A, the order in which the events are triggered will be:

For iOS < 18:

  1. viewWillDisappear() of screen B
  2. tabBarController(_:didSelect:) of UITabbarController

For iOS >= 18:

  1. tabBarController(_:didSelect:) of UITabbarController
  2. viewWillDisappear() of screen B

So my question is this an issue or a new update from Apple on iOS 18.*?

Looks like a change in iOS 18, and it looks like it's correct now.

You tapped a different tab, so the first action should be "I selected a tab", and the second would be "the tab I'm currently on is going to disappear".

They shouldn't be the other way round because why would the tab start to disappear without some input?

Is it causing an issue in your app on the two different iOS versions?

So I just want to get confirmation from Apple if this will be a new update for UI events or just an issue that will be fix in upcoming iOS versions.

I don’t see this mentioned in any iOS 18.* release notes. So there are a few possibilities:

  • It’s a newly introduced bug. Consider submitting a bug report via Feedback Assistant. (And post the bug number here, just for the record.)
  • It’s a fix of a previous bug, but they forgot to mention it in the release notes. Consider submitting a Feedback on this.
  • It’s merely a change from old valid behavior to new valid behavior, with no release notes required.

I vote for the 3rd interpretation. Unless the UIKit documentation already covers the relative ordering of these calls (thus establishing an API contract in this area) then either order is plausible. Is the view going to disappear? Yes. Did a new tab get selected? Yes.

UITabbarController issue on iOS 18
 
 
Q