YMARatingAppearance
Objective-C
@interface YMARatingAppearance : NSObject <NSCopying, NSMutableCopying>
Swift
class YMARatingAppearance : NSObject, NSCopying, NSMutableCopying
A class with fixed settings for the standard rating appearance. If you want to edit the standard appearance settings, use the YMAMutableRatingAppearance
class.
- Properties
- emptyStarColor
- filledStarColor
- preferredStarSize
- Methods
- +appearanceWithEmptyStarColor:filledStarColor:starSize:
The outline color of an empty (unfilled) star.
Declaration
Objective-C
@property (nonatomic, strong, readonly) UIColor *_Nonnull emptyStarColor;
The color of a filled star.
Declaration
Objective-C
@property (nonatomic, strong, readonly) UIColor *_Nonnull filledStarColor;
The preferred size of a star.
Declaration
Objective-C
@property (nonatomic, readonly) CGFloat preferredStarSize;
Swift
var preferredStarSize: CGFloat { get }
Creates an object of the YMARatingAppearance
class, that is, a rating with the specified appearance (outline color, size, and other settings).
Declaration
Objective-C
+ (nonnull instancetype)
appearanceWithEmptyStarColor:(nonnull UIColor *)emptyStarColor
filledStarColor:(nonnull UIColor *)filledStarColor
starSize:(CGFloat)starSize;
Swift
convenience init(emptyStarColor: Any!, filledStarColor: Any!, 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. |
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.