How to handle option-drag in iOS version of multi-platform app?
07:35 09 Apr 2026

The background:


As mentioned in previous posts, I'm rewriting an older Mac kaleidoscope generating app written in Objective C and OpenGL as a multi-platform  macOS/iOS/iPadOS app in SwiftUI and Metal.

In the existing Mac app, users can see the source image with the triangular section that they use to create their kaleidoscope. There is also a "rotation point" on the source image that the program uses as a "pivot point" to rotate the "source triangle" around in the source image.

They can click and drag to edit the size, location, and orientation of the "source triangle" If they click and drag outside of the triangle, the program pivots the source triangle around the above-mentioned "pivot point". If they instead option-drag, the program rotates the source triangle around its center.

In the Mac version of the multi-platform app, I can use the code `NSEvent.modifierFlags` to find the modifier keys that were pressed at the time my drag gesture recognizer fires. Here is a screenshot of the existing Mac app:

ScopeWorks screenshot showing source triangle and pivot point

The question:


Is there an equivalent function in iOS for those who are using a keyboard? And is that even the right way to design the UX for iOS? Not many people have keyboards attached to their devices.

Do readers of this question have suggestions of a more iOS-like equivalent of dragging vs. option-dragging?

ios macos swiftui user-experience multiplatform