FloraButton 2.0.0

FloraButton 2.0.0

Maintained by Priyam Dutta.



  • By
  • PriyamDutta

PDFloraButton

CI Status Version License Platform

Use PDFloraButton.swift class to add flora button over any view using minimum lines of code. You can add images also to the surrounding buttons by sending an array of images string. Hence! let you use easily.

Screen Shot

alt tag

Predefined Positions

center, topLeft, topRight, bottomLeft, bottomRight, midTop, midBottom, midLeft, midRight

alt tag

Easy usability Swift 3.0

import UIKit

class ViewController: UIViewController {

let floraButton = PDFloraButton(withPosition: .center, size: 50.0, numberOfPetals: 20, images:[]) let floraButton2 = PDFloraButton(withPosition: .topLeft, size: 50.0, numberOfPetals: 4, images:[]) let floraButton3 = PDFloraButton(withPosition: .topRight, size: 50.0, numberOfPetals: 4, images:[]) let floraButton4 = PDFloraButton(withPosition: .bottomLeft, size: 50.0, numberOfPetals: 4, images:[]) let floraButton5 = PDFloraButton(withPosition: .bottomRight, size: 50.0, numberOfPetals: 4, images:[])

override func viewDidLoad() { super.viewDidLoad() self.view.addSubview(floraButton) self.view.addSubview(floraButton2) self.view.addSubview(floraButton3) self.view.addSubview(floraButton4) self.view.addSubview(floraButton5)

floraButton.buttonActionDidSelected = { (indexSelected) in debugPrint("Selected Index: (indexSelected)") } } }

Get Explained

https://medium.com/@iopriyam93/ios-coordinate-system-trigonometry-5432c05909b1

Example

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

Requirements

Installation

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

pod 'FloraButton'

Author

PriyamDutta, [email protected]

License

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