Latest 0.2.0
Homepage https://github.com/William-Weng/WWRotaryWheel
License MIT
Platforms ios 10.0
Frameworks UIKit
Authors

一個滾輪Tab按鈕

Swift 4.0 Version Platform License

一個滾輪Tab按鈕 (上傳至Cocoapods)

使用範例

IBOutlet

import UIKit
import WWRotaryWheel

class ViewController: UIViewController {

    @IBOutlet weak var myRotaryWheel: WWRotaryWheel!
    @IBOutlet weak var myLabel: UILabel!

    override func viewDidLoad() {
        super.viewDidLoad()
        myRotaryWheel.delegate = self
        // myRotaryWheel.imageSetting([#imageLiteral(resourceName: "list"), #imageLiteral(resourceName: "like"), #imageLiteral(resourceName: "meeting"), #imageLiteral(resourceName: "plus"), #imageLiteral(resourceName: "check-mark")])
        myRotaryWheel.titleSetting(["🐶", "🐭", "👻", "🦊", "🐼"])
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
    }
}

extension ViewController: WWRotaryWheelDelegate {

    func wwRotaryWheel(_ wwRotaryWheel: WWRotaryWheel, clickedItemAt index: Int, for buttons: [UIButton]) {
        myLabel.text = index.description
    }

    func wwRotaryWheel(_ wwRotaryWheel: WWRotaryWheel, selectedItemAt index: Int, for buttons: [UIButton]) {
        for button in buttons { button.backgroundColor = .clear }
        buttons[index].backgroundColor = .yellow
    }
}

Latest podspec

{
    "name": "WWRotaryWheel",
    "version": "0.2.0",
    "summary": "WWRotaryWheel is a tab rotary button. (u4e00u500bu6efeu8f2aTabu6309u9215)",
    "homepage": "https://github.com/William-Weng/WWRotaryWheel",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "u7fc1u79b9u658c(William.Weng)": "[email protected]"
    },
    "platforms": {
        "ios": "10.0"
    },
    "ios": {
        "vendored_frameworks": "WWRotaryWheel.framework"
    },
    "source": {
        "git": "https://github.com/William-Weng/WWRotaryWheel.git",
        "tag": "0.2.0"
    },
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This