520coding / FTroulette

ios轮盘,圆形指示器

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FTroulette

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

FTroulette is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'FTroulette'

Principle

1.以触碰点P与圆心O1为起始边,对±θ角范围内的刻度线进行偏移。角θ可根据三角形O1O2A,利用余弦定理,已知三边求角:a=r,b=R,c=R-d 代入即可求得α,即θ

Image text


2.原刻度线ab,偏移后得到新刻度线a'b',新刻度线的位置L,可根据三角形O1O2a',利用余弦定理结合完全平方公式,已知两边和一角求第三边:∠γ=∠α-∠β,a=R-d,c=r 代入即可求得b,即L

Image text


Demo

Image text

注意:如遇到图片加载缓慢或失败,请参照——解决办法

Author

794751446@qq.com, 1085192695@qq.com

License

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

About

ios轮盘,圆形指示器

License:MIT License


Languages

Language:Objective-C 94.5%Language:Ruby 5.5%