2

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.

1 Answer 1

0

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

Sign up to request clarification or add additional context in comments.

3 Comments

YES is the default starting with iOS 17. Even with this, I'm still can't use the mouse for horizontal scroll. But as you said, it works for "Designed for iPad" targets.
have you found any solution?
In my case the solution works even on iOS 17/MacOS 14;x (and MacOS 15.x)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.