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
-
highlighted
Whether the icon view is in its highlighted state.
property -
mask
The current CGImage mask held by the view. Read-only.
property
Traits
-
trait
Returns 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
-
– renderImage
Render the icon unhighlighted to a UIImage.
-
– renderHighlightedImage
Render 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
-
– gradientStartColor
The 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
-
– gradientEndColor
The 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 highlighted
Declared In
MOOMaskedIconView.h
mask
The current CGImage mask held by the view. Read-only.
@property (nonatomic, assign, readonly) CGImageRef mask
Declared In
MOOMaskedIconView.h
Instance Methods
gradientEndColor
The color filled at the gradient’s end location. Cleared by gradientColors if that’s set.
- (UIColor *)gradientEndColor
Discussion
@deprecated Use gradientColors instead
Declared In
MOOMaskedIconView.h
gradientStartColor
The color filled at the gradient’s start location. Cleared by gradientColors if that’s set.
- (UIColor *)gradientStartColor
Discussion
@deprecated Use gradientColors instead
Declared In
MOOMaskedIconView.h
mixInTrait:
Apply the properties of the passed-in trait in addition to the icon’s current properties.
- (void)mixInTrait:(id<MOOStyleTrait>)trait
Parameters
- trait
The trait to mix in.
See Also
Declared In
MOOMaskedIconView.h
renderHighlightedImage
Render the icon highlighted to a UIImage.
- (UIImage *)renderHighlightedImage
Discussion
Useful for passing the icon to other views, e.g. UIButton.
See Also
Declared In
MOOMaskedIconView.h
renderImage
Render the icon unhighlighted to a UIImage.
- (UIImage *)renderImage
Discussion
Useful for passing the icon to other views, e.g. UIButton.
See Also
Declared In
MOOMaskedIconView.h
setGradientColors:
An optional array of UIColors defining the color of the gradient at each stop. Setting gradientColors clears gradientStartColor and gradientEndColor.
- (void)setGradientColors:(NSArray *)gradientColors
See Also
Declared In
MOOMaskedIconView.h
setGradientEndColor:
The color filled at the gradient’s end location. Cleared by gradientColors if that’s set.
- (void)setGradientEndColor:(UIColor *)gradientEndColor
Discussion
@deprecated Use gradientColors instead
Declared In
MOOMaskedIconView.h
setGradientStartColor:
The color filled at the gradient’s start location. Cleared by gradientColors if that’s set.
- (void)setGradientStartColor:(UIColor *)gradientStartColor
Discussion
@deprecated Use gradientColors instead
Declared In
MOOMaskedIconView.h