Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Write iOS Game Once and Play in Any Way

Write iOS Game Once and Play in Any Way

Write iOS Game Once and Play in Any Way by UJ Cheng @ try! Swift Tokyo 2025
https://youtu.be/cJ4ozf762kA

iamhands0me

April 10, 2025

Transcript

14 slides
  1. Write iOS Game Once and Play in Any Way Follow

    「iamhands0me」on U. J. Cheng, Advanced Software Engineer @
  2. 1. Device Motion Core Motion Accelerometer Gyroscope WWDC 23: What’s

    new in Core Motion https://developer.apple.com/videos/play/wwdc2023/10179/
  3. https://developer.apple.com/documentation/swiftui/view/ onhover(perform:) GameView(force: $force) { HStack(spacing: 0) { Color.clear.onHover {

    hover in if hover { force = -0.1 } } Color.clear.onHover { hover in if hover { force = 0.1 } } } }
  4. References • Core Motion / Getting raw accelerometer events https://developer.apple.com/documentation/coremotion/getting-raw-accelerometer-events

    • SwiftUI / View / accessibilityAdjustableAction(_:) https://developer.apple.com/documentation/swiftui/view/accessibilityadjustableaction(_:) • Game Controller / Handling input events https://developer.apple.com/documentation/gamecontroller/handling-input-events • SwiftUI / View / onHover(perform:) https://developer.apple.com/documentation/swiftui/view/onhover(perform:) Follow 「iamhands0me」on

More Decks by iamhands0me

Other Decks in Programming