Created
April 27, 2010 23:42
-
-
Save j4johnfox/381509 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)drawRect:(CGRect)aRect | |
{ | |
log('here in MMSGradientView drawRect'); | |
var myContext = [[CPGraphicsContext currentContext] graphicsPort]; | |
var myGradient = CGGradientCreateWithColorComponents(CGColorSpaceCreateDeviceRGB(), [1, 1, 1,1.0, .5, .5, .5,1.0], [0,1], 2); | |
var startPoint = CGPointMake(0, 0); | |
var endPoint = CGPointMake(0, [self bounds].size.height); | |
CGContextDrawLinearGradient(myContext, myGradient, startPoint, endPoint, 0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment