just ME
just ME

Reputation: 1827

how to retrive iphone wallpaper in an ios app?

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.

Upvotes: 1

Views: 223

Answers (2)

rckoenes
rckoenes

Reputation: 69499

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.

Upvotes: 2

Tamás Zahola
Tamás Zahola

Reputation: 9311

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

Upvotes: 2

Related Questions