Skip to content

Instantly share code, notes, and snippets.

@ferbass
Last active December 27, 2015 00:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ferbass/7239784 to your computer and use it in GitHub Desktop.
Save ferbass/7239784 to your computer and use it in GitHub Desktop.
create a circle in view using bezierpath wi
- (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