很想知道 iPhone 锁屏动态壁纸的技巧

发布于 2025-01-02 23:54:36 字数 721 浏览 0 评论 0原文

此应用程序此应用程序说它在锁定屏幕上显示动态壁纸。我们有类似的要求。

从评论中得知,它正在以静音音量播放背景音乐,但与设置壁纸无关。

对我们来说完全是无赖的话题。任何人都可以建议从哪里开始吗?

引用了此提到了这个在我们的论坛上提问,但表示不会得到苹果的批准。那么当前的应用程序如何存在于商店中呢?

注意: 请将此视为真正的编程问题,因为我们无法找到起点。

This application and this application says it displays live wallpapers on lock screen. We have similar requirement.

From reviews came to know that it is playing music in background with silent volume, but it is not relevant to setting wallpapers.

Totally bummer topic for us. Can anyone please suggest some point where to begin.. ?

Referred this and Referred this questions on our forum, but says that it won't be approved by Apple. So how does current application exist on store ?

Note:
Please consider this as genuine programming questions as there is no starting point we can find.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

梦里的微风 2025-01-09 23:54:36

如果您播放音乐,可以使用 MPNowPlayingInfoCenter < /a> (适用于 iOS 5.0 及更高版本。)在锁定屏幕上设置封面、标题和艺术家等内容。您的代码可能如下所示:

NSMutableDictionary *currentTrackData = [[NSMutableDictionary alloc] init];
[currentTrackData setObject:"Some text" forKey:MPMediaItemPropertyTitle];

MPMediaItemArtwork *mediaItemArtwork =[[MPMediaItemArtwork alloc] initWithImage:[UIImage imageNamed:@"your image path"]];
[currentTrackData setObject:mediaItemArtwork forKey:MPMediaItemPropertyArtwork];
[mediaItemArtwork release];

[MPNowPlayingInfoCenter defaultCenter].nowPlayingInfo = currentTrackData;

不要忘记导入媒体播放器框架:

#import <MediaPlayer/MediaPlayer.h>

If you play music, you can use MPNowPlayingInfoCenter (Available in iOS 5.0 and later.) to set things like cover art, title and artist on the lock screen. Your code could look like this:

NSMutableDictionary *currentTrackData = [[NSMutableDictionary alloc] init];
[currentTrackData setObject:"Some text" forKey:MPMediaItemPropertyTitle];

MPMediaItemArtwork *mediaItemArtwork =[[MPMediaItemArtwork alloc] initWithImage:[UIImage imageNamed:@"your image path"]];
[currentTrackData setObject:mediaItemArtwork forKey:MPMediaItemPropertyArtwork];
[mediaItemArtwork release];

[MPNowPlayingInfoCenter defaultCenter].nowPlayingInfo = currentTrackData;

Dont forget to import the media player framework:

#import <MediaPlayer/MediaPlayer.h>
反目相谮 2025-01-09 23:54:36

实时锁屏应用程序必须这样做(MPNowPlayingInfoCenter),因为您在使用该应用程序时无法播放音乐

The live lockscreen app must be doing it this way (MPNowPlayingInfoCenter) as you cant play music whilst using the app

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文