From 7860a72ef986b2b8a4874798d55e8a48bd554318 Mon Sep 17 00:00:00 2001 From: Sameer Nawaz Date: Thu, 8 Apr 2021 12:32:06 +0530 Subject: [PATCH] Update README.md --- README.md | 106 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 102 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4c55e9e..a991c42 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,24 @@ -# FortuneWheel - [![CI Status](https://img.shields.io/travis/sameersyd/FortuneWheel.svg?style=flat)](https://travis-ci.org/sameersyd/FortuneWheel) [![Version](https://img.shields.io/cocoapods/v/FortuneWheel.svg?style=flat)](https://cocoapods.org/pods/FortuneWheel) [![License](https://img.shields.io/cocoapods/l/FortuneWheel.svg?style=flat)](https://cocoapods.org/pods/FortuneWheel) [![Platform](https://img.shields.io/cocoapods/p/FortuneWheel.svg?style=flat)](https://cocoapods.org/pods/FortuneWheel) +![GitHub Cards Preview](https://github.com/sameersyd/FortuneWheel/blob/master/art/GITHUB-COVER.png?raw=true) + +# Fortune Wheel +Fortune spinning wheel 🎡, cocoapods library built using SwiftUI, supports dynamic content. *Made with love ❤️ by [Sameer Nawaz](https://github.com/sameersyd)* + +
+ +## Preview - Spin Wheel ⚙️ + + +
+ ## Example To run the example project, clone the repo, and run `pod install` from the Example directory first. -## Requirements - ## Installation FortuneWheel is available through [CocoaPods](https://cocoapods.org). To install @@ -20,6 +28,96 @@ it, simply add the following line to your Podfile: pod 'FortuneWheel' ``` +Import Fortune Wheel in your class +```ruby +import FortuneWheel +``` + +## Sample Code for Fortune Wheel 🌟 + +```swift +struct ContentView: View { + var players = ["Sameer", "Spikey", "Amelia", "Joan", "Karen", "Natalie"] + var body: some View { + ZStack { + FortuneWheel(titles: players, size: 320, onSpinEnd: { index in + // your action here - based on index + }) + } + } +} +``` + +## Motion Toast View + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterOptionalTypeDefault Value
titlesfalse[String]nil
sizefalseCGFloatnil
onSpinEndfalse(Int) -> ()nil
colorstrue[Color]Default Color codes[]
pointerColortrueColorColor(hex: "DA4533")
strokeWidthtrueCGFloat15
strokeColortrueColorColor(hex: "252D4F")
animationtrueAnimationAnimation.timingCurve(0.51, 0.97, 0.56, 0.99, duration: 6)
+ + +## Contribute +If you want to contribute to this app, you're always welcome! +See [Contributing Guidelines](https://github.com/sameersyd/FortuneWheel/blob/main/CONTRIBUTION.md). + + +## Donation +If this project helped you reduce time to develop, you can buy me a cup of coffee :) + +Buy Me A Coffee + + ## Author sameersyd, sameer.nwaz@gmail.com