Swiftpack.co - tichise/OMJoystick as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by tichise.
tichise/OMJoystick 0.8.1
This is the JoyStick UI library for SwiftUI.
⭐️ 18
🕓 7 weeks ago
iOS
.package(url: "https://github.com/tichise/OMJoystick.git", from: "0.8.1")

OMJoystick CocoaPods Version Platform License

This is the JoyStick UI library for SwiftUI.

Image

image

Examples

Swift

Simple

import SwiftUI
import OMJoystick

struct ContentView: View {

    var body: some View {
        OMJoystick(colorSetting: ColorSetting()) { (joyStickState, stickPosition) in
        }
    }
}

Customize

import SwiftUI
import OMJoystick
import SFSafeSymbols

struct ContentView: View {        
    let iconSetting = IconSetting(
        leftIcon: Image(systemSymbol: .arrowLeft),
        rightIcon: Image(systemSymbol: .arrowRight),
        upIcon: Image(systemSymbol:.arrowUp),
        downIcon: Image(systemSymbol: .arrowDown)
    )
    
    let colorSetting = ColorSetting(subRingColor: .red, bigRingNormalBackgroundColor: .green, bigRingDarkBackgroundColor: .blue, bigRingStrokeColor: .yellow)
    
    var body: some View {
        GeometryReader { geometry in
            VStack(alignment: .center, spacing: 5) {
                OMJoystick(isDebug: true, iconSetting: self.iconSetting,  colorSetting: ColorSetting(), smallRingRadius: 70, bigRingRadius: 120
                ) { (joyStickState, stickPosition)  in
                    
                }.frame(width: 315, height: 315)
            }
        }
    }
}

struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView()
    }
}

Installation (CocoaPods)

pod 'OMJoystick'

CocoaPods URL

OMJoystick on CocoaPods.org

License

OMJoystick is available under the MIT license. See the LICENSE file for more info.

GitHub

link
Stars: 18
Last commit: 7 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

0.8.1
7 weeks ago

What's Changed

Full Changelog: https://github.com/tichise/OMJoystick/compare/0.8.0...0.8.1

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics