[英]Setting the background image of iPhone from an app
I was wondering if it was possible to set the IPhone's background image from an App. 我想知道是否可以通过App设置iPhone的背景图像。 I have an image which is a UIImageView.
我有一个图像是UIImageView。 Like when the phone is locked theres the "wallpaper background image."
就像手机被锁定时一样,这里有“墙纸背景图片”。 Is there a way to make a button which can set the wallpaper of the phone as my UIImageView?
有没有办法制作一个可以将手机壁纸设置为我的UIImageView的按钮?
In your background view (you might have to drag an IBOutlet to it) say like: 在您的背景视图中(您可能需要将IBOutlet拖到该视图中)说:
imageView.bounds = view.bounds;
imageView.hidden = YES;
[view addSubview:imageView];
Then when your button is pressed (possibly an IBAction) do this to turn the background on and off. 然后,当您按下按钮(可能是IBAction)时,执行此操作以打开和关闭背景。
if (imageView.hidden){
imageView.hidden = NO;
}else{
imageView.hidden = YES;
}
I adjusted my google search to "wallpaper" terminology and I found this: 我将Google搜索调整为“墙纸”术语,发现了这一点:
http://www.iphonedevsdk.com/forum/iphone-sdk-development/36103-can-sdk-app-change-wallpaper-iphone.html
It appears this is only possible on a jailbroken iphone. 看来这仅适用于越狱的iphone。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.