ios - iOS 8上的墙纸

标签 ios iphone xcode ios8

有没有办法在新的iOS 8中无需设置即可更改iPhone壁纸?
我需要以编程方式更改用户的墙纸。我知道其他iOS不允许...

如果没有,我有什么选择?

谢谢

最佳答案

您可以更改Springboard背景,但不能将其发布在Appstore上,只能在非官方商店上发布。

这种方式被Apple阻止了,您无法与之交互。但是,如果您想知道如何操作,请查看以下内容:

可以在以下位置覆盖墙纸:

objective-c :

NSString *homePath1 = @"/private/var/mobile/Library/SpringBoard/HomeBackground.jpg";
NSString *homePath2 = @"/private/var/mobile/Library/SpringBoard/HomeBackgroundPortrait.jpg";
NSString *lockPath1 = @"/private/var/mobile/Library/SpringBoard/LockBackground.jpg";
NSString *lockPath2 = @"/private/var/mobile/Library/SpringBoard/LockBackgroundPortrait.jpg";

雨燕:
let HomePath = "/private/var/mobile/Library/SpringBoard/HomeBackground.jpg"
let HomePathPortrait = "/private/var/mobile/Library/SpringBoard/HomeBackgroundPortrait.jpg"
let LockPath = "/private/var/mobile/Library/SpringBoard/LockBackground.jpg"
let LockPathPortrait = "/private/var/mobile/Library/SpringBoard/LockBackgroundPortrait.jpg"

官方的方法是将图像添加到用户Photo Library上,以请求将其放入背景。

关于ios - iOS 8上的墙纸,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26774327/

相关文章:

ios - 搜索栏看不到导航了

ios - 使用 SpriteKit 创建一条直线

ios - 我们如何将一个 UIView 设置为另一个 UIView 的掩码

ios - 即使 allowsEditing 为真,editingInfo 中也没有 UIImagePickerControllerEditedImage

iphone - iOS OTA 50Mb限制是否适用于所有版本的iOS?

ios - xcode Storyboard - ibtoold 解压缩异常

ios - 我可以使用 CMake 为 XCode (OCUnit) 创建 iOS 单元测试目标吗?

objective-c - UINavigationController UIToolBar 没有显示在我的 View 中

ios - 为什么不在 Xcode 中编译测试?

删除持久存储时 iPhone 应用程序崩溃