Last active
December 27, 2015 00:39
-
-
Save ferbass/7239784 to your computer and use it in GitHub Desktop.
create a circle in view using bezierpath wi
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 | |
{ | |
CGRect box = CGRectInset(self.bounds, self.bounds.size.width * 0.1f, self.bounds.size.height * 0.1f); | |
UIBezierPath *ballBezierPath = [UIBezierPath bezierPathWithOvalInRect:box]; | |
[[UIColor whiteColor] setStroke]; | |
[[UIColor colorWithRed:0.734 green:0.000 blue:0.000 alpha:1.000] setFill]; | |
[ballBezierPath stroke]; | |
[ballBezierPath fill]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment