Skip to content

Instantly share code, notes, and snippets.

@thoretton-edwin
Created February 20, 2014 09:45
Show Gist options
  • Save thoretton-edwin/9110179 to your computer and use it in GitHub Desktop.
Save thoretton-edwin/9110179 to your computer and use it in GitHub Desktop.
iOS edit background view with UIImage
//Background design
UIGraphicsBeginImageContext(self.view.frame.size);
[[UIImage imageNamed:@"appBackground.png"] drawInRect:self.view.bounds];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
self.view.backgroundColor = [UIColor colorWithPatternImage:image];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment