Question

I am new to iOS. I am planing to display in a UIView the wallpaper image that is set on the iPhone where the app is installed. How to do this?

Here is the code I have so far:

[self.view setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"example.png"]]];

Instead of example.png I want to take programatically the name of the imageview set in the wallpaper.

Was it helpful?

Solution

You can't, since the your app is sandbox you can not access file out side of your apps sandbox. And since Apple does not provide any API to access the background you will not be able to access it.

OTHER TIPS

It's impossible. This functionality is not available for 3rd party developers, due to privacy concerns.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top