I am constructing a Python iOS app with Toga 0.5.x (Briefcase 0.3.16), which backs toga.OptionContainer with a UITabBarController. The app works completely on iPhone, however on iPad Professional (M5, iOS 18 simulator) the complete residence display is non-responsive after login — touches should not delivered to Python handlers.
What works:
-
Login (tapping the login button fires accurately)
-
The toga detailed checklist renders and is seen
-
The tab bar is seen on the high
What would not:
-
Tapping any row within the detailed checklist —
tableView:didSelectRowAtIndexPath:by way ofUITableViewDelegateby no means fires -
Tapping the
UIBarButtonItem -
Tapping the tab bar objects themselves
Prognosis thus far:
I set UITabBarController.mode = .tabBar (worth 1) instantly after creation, earlier than the controller is added to any window, utilizing the express ObjC selector by way of rubicon-objc:
self.home_option._impl.native_controller.setMode_(1)
print(self.home_option._impl.native_controller.mode) # prints: 1
The log confirms mode is about to 1. The UITabBarController is simply added to the window’s view hierarchy after the window is seen and the person has logged in. However regardless of all this, no touches attain Python on iPad. The exact same code on iPhone delivers all touches accurately.
My idea: iPadOS 18 is inserting some invisible overlay or touch-intercepting view over the content material when UITabBarController is used on iPad, even in .tabBar mode. This prevents hit-testing from reaching the desk view or bar button objects.
Minimal copy:
import toga
from toga.fashion import Pack
from toga.fashion.pack import COLUMN
class MyApp(toga.App):
def startup(self):
content_box = toga.Field(fashion=Pack(course=COLUMN, flex=1))
label = toga.Label('Faucet me')
btn = toga.Button('Press', on_press=lambda w: print('pressed!'))
content_box.add(label, btn)
tab = toga.OptionContainer(
content material=[('Tab 1', content_box)],
fashion=Pack(flex=1),
)
# Set mode = .tabBar on iPad iOS 18
tab._impl.native_controller.setMode_(1)
main_box = toga.Field(fashion=Pack(course=COLUMN, flex=1))
main_box.add(tab)
self.main_window = toga.MainWindow()
self.main_window.content material = main_box
self.main_window.present()
On iPad iOS 18 simulator, urgent the button by no means prints 'pressed!'. On iPhone it really works.
Questions:
-
What’s iPadOS 18 doing to
UITabBarControllerthat blocks contact supply, even in.tabBarmode? -
Is there a
UITabBarControllerdelegate methodology, subclass override, or configuration that restores regular hit-testing on iPad iOS 18? -
Is there a strategy to examine which view is intercepting touches (e.g. by way of Xcode’s View Debugger, I can test if there’s an invisible overlay)?
Surroundings: Xcode 16, iOS 18.x simulator, TARGETED_DEVICE_FAMILY = "1,2" (Common), Python 3.12, rubicon-objc 0.4.9, toga-iOS 0.5.1.
