Latest 0.1.1
Homepage https://github.com/canner/RatingRow
License MIT
Platforms ios 9.0, requires ARC
Dependencies Eureka, Cosmos
Authors

RatingRow – Eureka

A customized rating row in Eureka, based on Cosmos – star rating control library

Install via pod

add pod in your podfile:

pod 'RatingRow'

and install via Cocoapods

pod install

Usage

import UIKit
import Eureka
import RatingRow

class ViewController: FormViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.

        form
            +++ Section("default")
                <<< RatingRow()
            +++ Section("set vlaue") {
                $0.footer?.height = {0}
                $0.header?.height = {20}
            }
                <<< RatingRow() {
                    $0.rating = 4
            }
            +++ Section("set text") {
                $0.footer?.height = {0}
                $0.header?.height = {20}
            }
                <<< RatingRow() {
                    $0.text = "(124)"
            }
            +++ Section("set star size") {
                $0.footer?.height = {0}
                $0.header?.height = {20}
            }
                <<< RatingRow() {
                    $0.starSize = 45
                    $0.cell.height = {100}
            }
            +++ Section("set star margin") {
                $0.footer?.height = {0}
                $0.header?.height = {20}
            }
                <<< RatingRow() {
                    $0.starMargin = 15
            }
            +++ Section("set star filled color, and filled border value") {
                $0.footer?.height = {0}
                $0.header?.height = {20}
            }
                <<< RatingRow() {
                    $0.filledColor = UIColor.cyan
                    $0.filledBorderColor = UIColor.cyan
                    $0.rating = 3
            }
            +++ Section("set star empty border color") {
                $0.footer?.height = {0}
                $0.header?.height = {20}
            }
                <<< RatingRow() {
                    $0.emptyBorderColor = UIColor.blue
                    $0.rating = 2
            }
            +++ Section("set half star") {
                $0.footer?.height = {0}
                $0.header?.height = {20}
            }
                <<< RatingRow() {
                    $0.fillMode = .half
                    $0.rating = 2.5
            }
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
}

License

MIT

Latest podspec

{
    "name": "RatingRow",
    "version": "0.1.1",
    "summary": "Rating row in Eureka",
    "homepage": "https://github.com/canner/RatingRow",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "chilijung": "[email protected]"
    },
    "platforms": {
        "ios": "9.0"
    },
    "requires_arc": true,
    "source": {
        "git": "https://github.com/canner/RatingRow.git",
        "tag": "v0.1.1",
        "submodules": true
    },
    "source_files": "RatingRow/**/*.{h,swift}",
    "ios": {
        "frameworks": [
            "UIKit",
            "Foundation"
        ]
    },
    "dependencies": {
        "Eureka": [
            "~> 3.0"
        ],
        "Cosmos": [
            "~> 9.0"
        ]
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This