MOOMaskedIconView Class Reference
| Inherits from | UIView |
| Conforms to | MOOMaskedIconViewStyles |
| Declared in | MOOMaskedIconView.h MOOMaskedIconView.m |
Overview
MOOMaskedIconView is a UIView subclass that uses black-and-white masks to draw icons of different styles at any size or resolution. It’s like Photoshop layer styles, using the same technique as UITabBar to generate various effects from a single icon mask.
Tasks
State Properties
-
highlightedWhether the icon view is in its highlighted state.
property -
maskThe current CGImage mask held by the view. Read-only.
property
Traits
-
traitReturns a trait composed of the icon’s current style properties.
property -
– mixInTrait:Apply the properties of the passed-in trait in addition to the icon’s current properties.
Rendering
-
– renderImageRender the icon unhighlighted to a UIImage.
-
– renderHighlightedImageRender the icon highlighted to a UIImage.
Other Methods
-
– setGradientColors:An optional array of UIColors defining the color of the gradient at each stop. Setting gradientColors clears gradientStartColor and gradientEndColor.
Other Methods
-
– gradientStartColorThe color filled at the gradient’s start location. Cleared by gradientColors if that’s set.
Other Methods
-
– setGradientStartColor:The color filled at the gradient’s start location. Cleared by gradientColors if that’s set.
Other Methods
-
– gradientEndColorThe color filled at the gradient’s end location. Cleared by gradientColors if that’s set.
Other Methods
-
– setGradientEndColor:The color filled at the gradient’s end location. Cleared by gradientColors if that’s set.
Properties
highlighted
Whether the icon view is in its highlighted state.
@property (nonatomic, assign, getter=isHighlighted) BOOL highlightedDeclared In
MOOMaskedIconView.hmask
The current CGImage mask held by the view. Read-only.
@property (nonatomic, assign, readonly) CGImageRef maskDeclared In
MOOMaskedIconView.hInstance Methods
gradientEndColor
The color filled at the gradient’s end location. Cleared by gradientColors if that’s set.
- (UIColor *)gradientEndColorDiscussion
@deprecated Use gradientColors instead
Declared In
MOOMaskedIconView.hgradientStartColor
The color filled at the gradient’s start location. Cleared by gradientColors if that’s set.
- (UIColor *)gradientStartColorDiscussion
@deprecated Use gradientColors instead
Declared In
MOOMaskedIconView.hmixInTrait:
Apply the properties of the passed-in trait in addition to the icon’s current properties.
- (void)mixInTrait:(id<MOOStyleTrait>)traitParameters
- trait
The trait to mix in.
See Also
Declared In
MOOMaskedIconView.hrenderHighlightedImage
Render the icon highlighted to a UIImage.
- (UIImage *)renderHighlightedImageDiscussion
Useful for passing the icon to other views, e.g. UIButton.
See Also
Declared In
MOOMaskedIconView.hrenderImage
Render the icon unhighlighted to a UIImage.
- (UIImage *)renderImageDiscussion
Useful for passing the icon to other views, e.g. UIButton.
See Also
Declared In
MOOMaskedIconView.hsetGradientColors:
An optional array of UIColors defining the color of the gradient at each stop. Setting gradientColors clears gradientStartColor and gradientEndColor.
- (void)setGradientColors:(NSArray *)gradientColorsSee Also
Declared In
MOOMaskedIconView.hsetGradientEndColor:
The color filled at the gradient’s end location. Cleared by gradientColors if that’s set.
- (void)setGradientEndColor:(UIColor *)gradientEndColorDiscussion
@deprecated Use gradientColors instead
Declared In
MOOMaskedIconView.hsetGradientStartColor:
The color filled at the gradient’s start location. Cleared by gradientColors if that’s set.
- (void)setGradientStartColor:(UIColor *)gradientStartColorDiscussion
@deprecated Use gradientColors instead
Declared In
MOOMaskedIconView.h