Conforms to NSObject
Declared in MOOMaskedIconView.h

Overview

MOOMaskedIconViewStyles is a protocol that abstracts the configurable styles from MOOMaskedIconView, allowing others to reuse the same set of styles.

Tasks

Style Properties

  •   color

    Fill color painted when the icon view is unhighlighted.

    property required method
  •   highlightedColor

    Fill color painted when the icon view is highlighted.

    property required method
  •   pattern

    A pattern composited over the icon. Created with UIColor’s colorWithPatternImage:.

    property required method
  •   patternBlendMode

    The blend mode under which the pattern is drawn. Defaults to kCGBlendModeNormal. For a list of options see “CGBlendMode”.

    property required method
  •   overlay

    An image composited over the icon after drawing’s done.

    property required method
  •   overlayBlendMode

    The blend mode under which the overlay is drawn. Defaults to kCGBlendModeNormal. For a list of options see “CGBlendMode”.

    property required method
  •   drawingBlock

    A block called with the current context at the end of every drawing. Has signature void (^DrawingBlock)(CGContextRef context).

    property required method

Gradient Properties

Shadow Properties

Glow Properties

Properties

clipsShadow

Set to YES if your icon is translucent and you don’t want the shadow showing through.

@property (nonatomic, assign) BOOL clipsShadow

Declared In

MOOMaskedIconView.h

color

Fill color painted when the icon view is unhighlighted.

@property (nonatomic, strong) UIColor *color

Discussion

When gradientStartColor and gradientEndColor are both non-nil, the view ignores fill color and draws a gradient.

Declared In

MOOMaskedIconView.h

drawingBlock

A block called with the current context at the end of every drawing. Has signature void (^DrawingBlock)(CGContextRef context).

@property (nonatomic, strong) DrawingBlock drawingBlock

Discussion

Useful for custom drawing.

Declared In

MOOMaskedIconView.h

gradientColors

An optional array of UIColors defining the color of the gradient at each stop. Setting gradientColors clears gradientStartColor and gradientEndColor.

@property (nonatomic, strong) NSArray *gradientColors

Declared In

MOOMaskedIconView.h

gradientEndColor

The color filled at the gradient’s end location. Cleared by gradientColors if that’s set.

@property (nonatomic, strong) UIColor *gradientEndColor

Discussion

@deprecated Use gradientColors instead

Declared In

MOOMaskedIconView.h

gradientLocations

An optional array of NSNumber objects defining the location of each gradient stop.

@property (nonatomic, strong) NSArray *gradientLocations

Discussion

Must have the same number of components as gradientColors. The gradient stops are specified as values between 0 and 1. The values must be monotonically increasing. If nil, the stops are spread uniformly across the range. Defaults to nil.

Declared In

MOOMaskedIconView.h

gradientStartColor

The color filled at the gradient’s start location. Cleared by gradientColors if that’s set.

@property (nonatomic, strong) UIColor *gradientStartColor

Discussion

@deprecated Use gradientColors instead

Declared In

MOOMaskedIconView.h

gradientType

Style of gradient drawn. MOOGradientTypeLinear is the sole option right now.

@property (nonatomic, assign) MOOGradientType gradientType

Declared In

MOOMaskedIconView.h

highlightedColor

Fill color painted when the icon view is highlighted.

@property (nonatomic, strong) UIColor *highlightedColor

Discussion

When gradientStartColor and gradientEndColor are both non-nil, the view ignores fill color and draws a gradient.

See Also

Declared In

MOOMaskedIconView.h

innerGlowColor

Specifies inner glow color.

@property (nonatomic, strong) UIColor *innerGlowColor

Declared In

MOOMaskedIconView.h

innerGlowRadius

Specifies the total displacement of the inner glow in points.

@property (nonatomic, assign) CGFloat innerGlowRadius

Declared In

MOOMaskedIconView.h

innerShadowColor

Specifies inner shadow color.

@property (nonatomic, strong) UIColor *innerShadowColor

Declared In

MOOMaskedIconView.h

innerShadowOffset

Specifies inner shadow offset.

@property (nonatomic, assign) CGSize innerShadowOffset

Declared In

MOOMaskedIconView.h

outerGlowColor

Specifies outer glow color.

@property (nonatomic, strong) UIColor *outerGlowColor

Discussion

Note: Generally requires a higher opacity or greater radius than its Photoshop counterpart to achieve the same effect.

Declared In

MOOMaskedIconView.h

outerGlowRadius

Specifies the total displacement of the outer glow in points.

@property (nonatomic, assign) CGFloat outerGlowRadius

Declared In

MOOMaskedIconView.h

overlay

An image composited over the icon after drawing’s done.

@property (nonatomic, strong) UIImage *overlay

Declared In

MOOMaskedIconView.h

overlayBlendMode

The blend mode under which the overlay is drawn. Defaults to kCGBlendModeNormal. For a list of options see “CGBlendMode”.

@property (nonatomic, assign) CGBlendMode overlayBlendMode

Declared In

MOOMaskedIconView.h

pattern

A pattern composited over the icon. Created with UIColor’s colorWithPatternImage:.

@property (nonatomic, strong) UIColor *pattern

Declared In

MOOMaskedIconView.h

patternBlendMode

The blend mode under which the pattern is drawn. Defaults to kCGBlendModeNormal. For a list of options see “CGBlendMode”.

@property (nonatomic, assign) CGBlendMode patternBlendMode

Declared In

MOOMaskedIconView.h

shadowColor

Specifies shadow color.

@property (nonatomic, strong) UIColor *shadowColor

Declared In

MOOMaskedIconView.h

shadowOffset

Specifies shadow offset.

@property (nonatomic, assign) CGSize shadowOffset

Declared In

MOOMaskedIconView.h