Reputation: 375
Preparing an iPad App for native MacOS experience using Mac Catalyst (and AppKit when needed) and using SwiftUI.
We observe that Horizontal Scroll is tricky using a Mouse! Most users have the habit of click+drag to scroll horizontally. This does not seem to be default behavior on ScrollView.
Strange: Same App when compiled on "Mac (Designed for iPad)" [aka Silicon only] scrolls horizontally with click drag. But not if compiled with Mac Catalyst.
Question: How can we enable general click-drag for horizontal scrolling using SwiftUI on Mac Catalyst? I wouldn't mind using specific AppKit framework if needed. Thanks in advance.
Upvotes: 2
Views: 207
Reputation: 375
For anyone coming across this:
Adding UIApplicationSupportsIndirectInputEvents
as YES to the App's plist will enable the default behavior.
Apple Documentation: https://developer.apple.com/documentation/bundleresources/information_property_list/uiapplicationsupportsindirectinputevents
Upvotes: 0