Make UITabBar wait for user input before switching tab
问题 I have a UITabBar with 5 tabs. When the middle tab is selected I want a UIAlertController Action Sheet to pop up, await user action and then load the new view once the user has selected from the Sheet since I need the data from the Sheet to load the view correctly. I currently have this code: extension CustomTabBarController: UITabBarControllerDelegate { func tabBarController(_ tabBarController: UITabBarController, shouldSelect viewController: UIViewController) -> Bool { guard let index =