GithubHelp home page GithubHelp logo

lygialiem / ttfortunewheel-ios Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tapptitude/ttfortunewheel-ios

0.0 1.0 0.0 3.16 MB

Fortune spinning wheel that supports custom drawing.

License: MIT License

Ruby 2.14% Swift 96.25% Objective-C 1.61%

ttfortunewheel-ios's Introduction

TTFortuneWheel-iOS

Platform Version License Twitter

About

Fortune spinning wheel that supports custom drawing and dynamic content.

This project is maintained by Tapptitude, a mobile app development agency specialized in building high-quality iOS and Android mobile apps, for startups and brands alike. A lively team of skilled app developers and app designers based in Europe, we provide full-stack mobile app development services to entrepreneurs looking to innovate on mobile.

Features:

  • Dynamic content
  • Each slice can have it's own style and angle
  • Drawn and animated using CoreGraphics
  • Customize(Font, Slice Color, Stroke, Frame color, width and shadow)
  • Predictible rotation to any slice
  • Exposes methods for custom Core Graphics drawings for each slice
  • Dynamic size

Requirements

  • iOS 9.0+
  • Xcode 8.2+

Installation

CocoaPods

Swift 5.0

pod 'TTFortuneWheel'

Swift 4.2

pod 'TTFortuneWheel', '~>0.1.6'

Swift 4.0

pod 'TTFortuneWheel', '~>0.1.5'

Carthage

github "tapptitude/TTFortuneWheel-iOS"

Manually

Add contents of TTFortuneWheel folder to your project.

Usage

You can place the FortuneWheel in your storyboard or add it as sa subview programatically.

override func viewDidLoad() {
        super.viewDidLoad()
        
        let slices = [ FortuneWheelSlice(title: "Slice 1"),
                       FortuneWheelSlice(title: "Slice 2"),
                       FortuneWheelSlice(title: "Slice 3")]
        
        let fortuneWheel = TTFortuneWheel(frame: frame, slices:slices)
        spinningWheel.equalSlices = true
        self.view.addSubview(fortuneWheel)        
}

How to customize?

In order to provide custom drawing for slices you have to implement FortuneWheelSliceProtocol. or can use the preconfiugred FortuneWheelSliceImpl class.

Contribution

Feel free to Fork, submit Pull Requests or send us your feedback and suggestions!

License

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.