Skip to content

Commit

Permalink
Fix documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
avaidyam committed Oct 17, 2012
1 parent f981326 commit 4372f9e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
19 changes: 7 additions & 12 deletions lib/UIKit/TUITableViewCell.h
Expand Up @@ -193,35 +193,30 @@ typedef enum {

@end

// Convenience CGFloat undefined value mapping to INFINITY.
#define CGFLOAT_UNDEFINED INFINITY

typedef enum {

// This gradients the first state's color to the next state's
// color forming a gradient. Although the definition is from
// one state to the next, you may adjust the gradient angle
// to reverse it as well, from the second state to the first.
// If the gradient angle for the style is CGFLOAT_UNDEFINED,
// these styles act identically to TUITableViewCellColorStyleNone.
TUITableViewCellGradientPatternBackgroundToHighlight,
TUITableViewCellGradientPatternHighlightToSelection,
TUITableViewCellGradientPatternSelectionToBackground,

// If alternate colors are set for each or any of the styles,
// a coalesced gradient can be formed between the base color and
// the alternating color as well. If the alternating color for the
// style is nil, or the angle for the style is CGFLOAT_UNDEFINED,
// it reverts to TUITableViewCellColorStyleNone.
// style is nil, it reverts to TUITableViewCellColorStyleNone.
TUITableViewCellGradientPatternNormalToAlternate,

// If the style is TUITableViewCellColorStyleCoalescedWithAlternates,
// the alternating color is coalesced with the standard color in a gradient.
// If the color style draws coalesced, the angle of coalescence can be
// adjusted per state. The value may not exceed the bounds 360.0f or -360.0f.
// If set to CGFLOAT_UNDEFINED, coalescence is disabled.
// If the color style is not TUITableViewCellColorStyleNone,
// the preset color styles are drawn as gradients at an angle.
TUITableViewCellGradientPatternDefault,
} TUITableViewCellGradientPattern;

// Returns a drawRect block for TUITableViewCell drawing the state
// background in a gradient using both its gradient pattern and the
// passed color style to determine its look. You may also pass an
// angle to draw the gradient in, which must be within [-360, 360].
extern TUIViewDrawRect gradientBackgroundWithAngledPattern(TUITableViewCellGradientPattern,
TUITableViewCellColorStyle, CGFloat);
2 changes: 1 addition & 1 deletion lib/UIKit/TUITableViewCell.m
Expand Up @@ -138,7 +138,7 @@ - (void)drawSelectedBackground:(CGRect)rect {
[[self colorForStyle:self.selectionStyle] set];
CGContextFillRect(TUIGraphicsGetCurrentContext(), rect);
} else {
NSColor *color = self.highlightColor ? self.highlightColor : self.backgroundColor;
NSColor *color = self.selectionColor ? self.selectionColor : self.backgroundColor;
BOOL alternated = (self.alternateSelectionColor && (self.indexPath.row % 2));

[alternated ? self.alternateSelectionColor : color set];
Expand Down

0 comments on commit 4372f9e

Please sign in to comment.