Latest 2.0.0
Homepage https://github.com/PriyamDutta/PDFloraButton
License MIT
Platforms ios 8.0
Frameworks UIKit
Authors

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.

Latest podspec

{
    "name": "FloraButton",
    "version": "2.0.0",
    "summary": "Use radial floating button for any corners and edges.",
    "description": "Add this library to use the radial floating buttons aka "FloraButtons".",
    "homepage": "https://github.com/PriyamDutta/PDFloraButton",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "PriyamDutta": "[email protected]"
    },
    "source": {
        "git": "https://github.com/PriyamDutta/PDFloraButton.git",
        "tag": "2.0.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "swift_version": "4.0",
    "source_files": "FloraButton/Classes/**/*",
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This