RatingAppearance
@objc(YMARatingAppearance)
@objcMembers
public class RatingAppearance : NSObject, NSCopying, NSMutableCopying
A class with fixed settings for the standard rating appearance.
Remark
If you want to edit the settings of the standard appearance, use theMutableRatingAppearance
class.
-
The outline color of an empty (unfilled) star.
Declaration
Swift
public var emptyStarColor: UIColor { get }
-
The color of a filled star.
Declaration
Swift
public var filledStarColor: UIColor { get }
-
The preferred size of a star.
Warning
If the use of the preferred size makes the rating too large for the space reserved for it, the maximum allowed size is used instead.Declaration
Swift
public var preferredStarSize: CGFloat { get }
-
Corresponding mutable representation of current rating appearance.
Declaration
Swift
public var mutableAppearance: MutableRatingAppearance { get }
-
Undocumented
Declaration
Swift
override public convenience init()
-
Creates an object of the
RatingAppearance
class, i.e., a rating with the specified appearance (outline color, size, and other settings).Declaration
Swift
public required convenience init( emptyStarColor: UIColor, filledStarColor: UIColor, starSize: CGFloat )
Parameters
emptyStarColor
The outline color of an empty (unfilled) star.
filledStarColor
The color of a filled star.
starSize
The preferred size of a star.
Return Value
Configured rating appearance.
-
Creates an object of the
RatingAppearance
class, i.e., a rating with the specified appearance (outline color, size, and other settings).Declaration
Swift
public static func appearanceWithEmptyStarColor( _ emptyStarColor: UIColor, filledStarColor: UIColor, starSize: CGFloat ) -> Self
Parameters
emptyStarColor
The outline color of an empty (unfilled) star.
filledStarColor
The color of a filled star.
starSize
The preferred size of a star.
Return Value
Configured rating appearance.
-
Undocumented
Declaration
Swift
public func copy(with zone: NSZone? = nil) -> Any
-
Undocumented
Declaration
Swift
public func mutableCopy(with zone: NSZone? = nil) -> Any