UIRating

open class UIRating : UIView
extension UIRating: UIRatingDelegate

A customizable rating view.

  • Sets the amount of option to rate from.

    Declaration

    Swift

    open var numberOfOptions: Int { get set }
  • Allows the selection of half ratings if set to true.

    Declaration

    Swift

    open var allowHalfSelection: Bool { get set }
  • Sets the spacing between options.

    Declaration

    Swift

    open var spacing: CGFloat { get set }
  • The delegate for UIRating.

    Declaration

    Swift

    open var delegate: UIRatingDelegate?
  • Sets the icon to use for an empty rating.

    Declaration

    Swift

    lazy open var emptyIcon: UIImage? { get set }
  • Sets the icon to use for a half rating.

    Declaration

    Swift

    lazy open var halfFullIcon: UIImage? { get set }
  • Sets the icon to use for a full rating.

    Declaration

    Swift

    lazy open var fullIcon: UIImage? { get set }

View life cycle

  • The default initializer for UIRating.

    Declaration

    Swift

    override public init(frame: CGRect)

    Parameters

    frame

    Sets the frame for the UIRating instance.

  • The required coder initializer for UIRating.

    Declaration

    Swift

    public required init?(coder: NSCoder)

    Parameters

    coder

    NSCoder.

Delegate