Created
March 2, 2016 06:02
-
-
Save jeepkd/530bc8fdef2c5cb50481 to your computer and use it in GitHub Desktop.
Dynamic background image from color
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
CGSize size = CGSizeMake(desiredWidth, desiredHeight); | |
UIGraphicsBeginImageContextWithOptions(size, YES, 0); | |
[[UIColor whiteColor] setFill]; | |
UIRectFill(CGRectMake(0, 0, size.width, size.height)); | |
UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); | |
UIGraphicsEndImageContext(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment