Guest User

Untitled

a guest
Jul 22nd, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. - (void)viewDidLoad {
  2. [super viewDidLoad];
  3. CGRect rect = CGRectMake(0,0,340,480);
  4. UIView *ui = [[UIView alloc] initWithFrame:rect];
  5. [self.view addSubview:ui];
  6. CGContextRef context = UIGraphicsGetCurrentContext();
  7. CGContextAddArc(context, 50, 50, 20, 0, 30, 0);
  8. }
  9.  
  10. //set the fill or stroke color
  11. CGContextSetRGBFillColor(context, 0.5, 0.5, 0.5 1.0);
  12. CGContextSetRGBStrokeColor(context, 0.5, 0.5, 0.5, 1.0);
  13.  
  14. //fill or draw the path
  15. CGContextDrawPath(context, kCGPathStroke);
  16. CGContextDrawPath(context, kCGPathFill);
Add Comment
Please, Sign In to add comment