문제

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.

도움이 되었습니까?

해결책

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.

다른 팁

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top