Created
August 25, 2013 03:17
-
-
Save xdream86/6331776 to your computer and use it in GitHub Desktop.
This file contains 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)rect { | |
CGContextRef ctx = UIGraphicsGetCurrentContext(); | |
UIGraphicsPushContext(ctx); | |
CGContextSetRGBFillColor(ctx, 1.0f, 1.0f, 1.0f, 1.0f); // white color | |
CGContextSetShadow(ctx, CGSizeMake(2.0f, 2.0f), 2.0f); //也可以使用CGContextSetShadowWithColor (myContext, myShadowOffset, 5, myColor); | |
CGContextFillEllipseInRect(ctx, CGRectMake(10.0f, 10.0f, 100.0f, 100.0f)); // a white filled circle with a diameter of 100 pixels, centered in (60, 60) | |
UIGraphicsPopContext(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment