Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS light linen background?

I really want to know if there's a way to get iOS's light linen background. Here's what it looks like: ios maps app open with menu open, map looks like a pealed up piece of paper. It is on an iPhone running a version of iOS before ios6

Is there a way to access this by merely using the built-in SDK? Or do I have to find an image like this somewhere?


EDIT: I didn't want to use private APIs, so here's what I did. I grabbed the image this way:

CGRect rect = CGRectMake(0.0f, 0.0f, 640.0f, 960.0f); UIGraphicsBeginImageContext(rect.size); CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetFillColorWithColor(context, [[UIColor underPageBackgroundColor] CGColor]); CGContextFillRect(context, rect); UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext();  NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *imagepath = [documentsDirectory stringByAppendingPathComponent:@"underPageBackground.png"]; [UIImagePNGRepresentation(image) writeToFile:imagepath atomically:YES]; 

And here is the resulting png in retina resolution: (click on thumbnail to open)

click for full resolution

Hope this is useful to someone. :)

like image 875
sudo rm -rf Avatar asked Jan 14 '11 17:01

sudo rm -rf


1 Answers

Use [UIColor underPageBackgroundColor]. And here is a link with useful information and samples.

like image 100
sha Avatar answered Sep 30 '22 09:09

sha