Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. UIGraphicsBeginImageContext(CGSizeMake(512.0, 512.0));
  2.  
  3. CGContextRef ctx = UIGraphicsGetCurrentContext();
  4. CGContextSetFillColorWithColor(ctx, [UIColor redColor].CGColor);
  5. CGContextFillRect(ctx, CGRectMake(0.0, 0.0, 512.0, 512.0));
  6. UIImage* myImage = UIGraphicsGetImageFromCurrentImageContext();
  7.  
  8. UIGraphicsEndImageContext();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement