F
F
Flie2015-04-20 16:39:47
Objective-C
Flie, 2015-04-20 16:39:47

How to display album art on lock screen in iOS?

Hey!
Tell me how to implement the display of the album cover for the song being played on the lock screen?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton, 2015-04-20
@Flie

MPMediaItemArtwork* cover = [[MPMediaItemArtwork alloc] initWithImage:image];
NSDictionary * mediaInfo = @{MPMediaItemPropertyArtwork: cover};
[[MPNowPlayingInfoCenter defaultCenter] setNowPlayingInfo:mediaInfo];

More details here:
https://developer.apple.com/library/prerelease/ios...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question