iOS 7 - Display user wallpaper as UIWindow background

只愿长相守 提交于 2019-11-28 22:55:28

问题


How would it be possible to have an iOS app display the user's wallpaper? Apple uses this in places like the tab view in Safari and the keypad in Phone. Setting the transparency of UIWindow proved to no avail...


回答1:


This is no longer available. Too bad, because it allowed a sweet native looking effect

there are a few things you need to do to show the user wallpaper

1 - set UIApplicationIsOpaque to false in the project plist

2 - In the app delegate load function

self.window.backgroundColor = [UIColor clearColor];
self.window.opaque = NO;

3 - set the UIViewController.view background color to [UIColor clearColor]

This works for us currently. If you try to do a screen capture or actually use the wallpaper it just returns solid black (so privacy concerns don't apply since you can't do anything with the wallpaper).




回答2:


This functionality is not available to third-party developers due to privacy concerns.

If you could do this in a third-party app, you could capture the background image without asking the user.



来源:https://stackoverflow.com/questions/18924135/ios-7-display-user-wallpaper-as-uiwindow-background

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!