Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 80 lines (59 sloc) 1.803 kb
23908e5 Sam Soffes Replaced TWStripView with TWGradientView
soffes authored
1 //
f3d43b6 Sam Soffes The Great Rename
soffes authored
2 // SSGradientView.h
3 // SSToolkit
23908e5 Sam Soffes Replaced TWStripView with TWGradientView
soffes authored
4 //
5 // Created by Sam Soffes on 10/27/09.
e8c3ce3 Sam Soffes Updated comments and renamed SSDrawingMacros to SSDrawingUtilities
soffes authored
6 // Copyright 2009-2011 Sam Soffes. All rights reserved.
23908e5 Sam Soffes Replaced TWStripView with TWGradientView
soffes authored
7 //
ea32379 Sam Soffes Switched SSGradientView back to CGGradient and kept support for multiple...
soffes authored
8
68080b5 Sam Soffes Renamed SSBordererView to SSBorderedView. That typeo has been there awhi...
soffes authored
9 #import "SSBorderedView.h"
23908e5 Sam Soffes Replaced TWStripView with TWGradientView
soffes authored
10
f63bf11 Sam Soffes More documentation
soffes authored
11 /**
12 The direction the gradient.
13 */
8392105 Sam Soffes Support horizontal gradients in SSGradientView. Fixes #13
soffes authored
14 typedef enum {
f63bf11 Sam Soffes More documentation
soffes authored
15 /** The gradient is horizontal. */
8392105 Sam Soffes Support horizontal gradients in SSGradientView. Fixes #13
soffes authored
16 SSGradientViewDirectionHorizontal,
f63bf11 Sam Soffes More documentation
soffes authored
17
18 /** The gradient is verticle. */
8392105 Sam Soffes Support horizontal gradients in SSGradientView. Fixes #13
soffes authored
19 SSGradientViewDirectionVertical
20 } SSGradientViewDirection;
21
072f882 Sam Soffes More documentation. #24 #25
soffes authored
22 /**
23 Simple `UIView` wrapper for `CGGradient`.
24 */
454e654 Sam Soffes Require Apple LLVM compiler 3.0
soffes authored
25 @interface SSGradientView : SSBorderedView
23908e5 Sam Soffes Replaced TWStripView with TWGradientView
soffes authored
26
bf2d0ec Sam Soffes Started overhauling documentation
soffes authored
27 ///---------------------------
28 /// @name Drawing the Gradient
fc1acd8 Sam Soffes Updated documentation coding convention
soffes authored
29 ///---------------------------
bf2d0ec Sam Soffes Started overhauling documentation
soffes authored
30
072f882 Sam Soffes More documentation. #24 #25
soffes authored
31 /**
32 An array of `UIColor` objects used to draw the gradient. If the value is `nil`, the `backgroundColor` will be drawn
33 instead of a gradient.
bf2d0ec Sam Soffes Started overhauling documentation
soffes authored
34
35 The default is `nil`.
7bb2691 Sam Soffes * Removed SSKeychain
soffes authored
36 */
b22f774 Sam Soffes Converted SSGradient view to use CAGradientLayer instead of CGGradient. ...
soffes authored
37 @property (nonatomic, copy) NSArray *colors;
7bb2691 Sam Soffes * Removed SSKeychain
soffes authored
38
072f882 Sam Soffes More documentation. #24 #25
soffes authored
39 /**
40 An optional array of `NSNumber` objects defining the location of each gradient stop.
b22f774 Sam Soffes Converted SSGradient view to use CAGradientLayer instead of CGGradient. ...
soffes authored
41
bf2d0ec Sam Soffes Started overhauling documentation
soffes authored
42 The gradient stops are specified as values between `0` and `1`. The values must be monotonically
43 increasing. If `nil`, the stops are spread uniformly across the range. Defaults to `nil`.
7bb2691 Sam Soffes * Removed SSKeychain
soffes authored
44 */
b22f774 Sam Soffes Converted SSGradient view to use CAGradientLayer instead of CGGradient. ...
soffes authored
45 @property (nonatomic, copy) NSArray *locations;
7bb2691 Sam Soffes * Removed SSKeychain
soffes authored
46
072f882 Sam Soffes More documentation. #24 #25
soffes authored
47 /**
48 The direction of the gradient.
8392105 Sam Soffes Support horizontal gradients in SSGradientView. Fixes #13
soffes authored
49
bbcba7b Sam Soffes Fixed a typeo in SSGradientView documentation
soffes authored
50 The default is `SSGradientViewDirectionVertical`.
8392105 Sam Soffes Support horizontal gradients in SSGradientView. Fixes #13
soffes authored
51 */
52 @property (nonatomic, assign) SSGradientViewDirection direction;
53
fc1acd8 Sam Soffes Updated documentation coding convention
soffes authored
54
bf2d0ec Sam Soffes Started overhauling documentation
soffes authored
55 ///-------------------------
56 /// @name Deprecated Methods
57 ///-------------------------
b22f774 Sam Soffes Converted SSGradient view to use CAGradientLayer instead of CGGradient. ...
soffes authored
58
072f882 Sam Soffes More documentation. #24 #25
soffes authored
59 /**
60 The top gradient color. This method is deprecated.
bf2d0ec Sam Soffes Started overhauling documentation
soffes authored
61
62 The default is `nil`.
b22f774 Sam Soffes Converted SSGradient view to use CAGradientLayer instead of CGGradient. ...
soffes authored
63 */
df98fab Sam Soffes Use strong and unsafe_unretained in properties
soffes authored
64 @property (nonatomic, strong) UIColor *topColor;
b22f774 Sam Soffes Converted SSGradient view to use CAGradientLayer instead of CGGradient. ...
soffes authored
65
072f882 Sam Soffes More documentation. #24 #25
soffes authored
66 /**
67 The bottom gradient color. This method is deprecated.
bf2d0ec Sam Soffes Started overhauling documentation
soffes authored
68
69 The default is `nil`.
b22f774 Sam Soffes Converted SSGradient view to use CAGradientLayer instead of CGGradient. ...
soffes authored
70 */
df98fab Sam Soffes Use strong and unsafe_unretained in properties
soffes authored
71 @property (nonatomic, strong) UIColor *bottomColor;
7bb2691 Sam Soffes * Removed SSKeychain
soffes authored
72
bf2d0ec Sam Soffes Started overhauling documentation
soffes authored
73 /** The scale of the gradient. This method is deprecated.
45ae51e Sam Soffes * Added `gradientScale` to SSGradientView
soffes authored
74
bf2d0ec Sam Soffes Started overhauling documentation
soffes authored
75 The default is `1.0`.
45ae51e Sam Soffes * Added `gradientScale` to SSGradientView
soffes authored
76 */
ea32379 Sam Soffes Switched SSGradientView back to CGGradient and kept support for multiple...
soffes authored
77 @property (nonatomic, assign) CGFloat gradientScale;
45ae51e Sam Soffes * Added `gradientScale` to SSGradientView
soffes authored
78
23908e5 Sam Soffes Replaced TWStripView with TWGradientView
soffes authored
79 @end
Something went wrong with that request. Please try again.