如何从 iPod 库歌曲中获取歌曲的歌词
我正在 iPhone 应用程序中访问 iPod 库并显示专辑的标题、歌词和插图。我还想显示歌曲的歌词。我已在 itunes 中添加歌词并将其与设备同步。但我的代码未显示歌词..
此处的示例 和获取歌词的代码是:-
- (void)handleNowPlayingItemChanged:(id)notification {
// Ask the music player for the current song.
MPMediaItem *currentItem = self.musicPlayer.nowPlayingItem;
// Display the artist, album, and song name for the now-playing media item.
// These are all UILabels.
self.songLabel.text = [currentItem valueForProperty:MPMediaItemPropertyTitle];
self.artistLabel.text = [currentItem valueForProperty:MPMediaItemPropertyAlbumArtist];
self.albumLabel.text = [[currentItem valueForProperty:MPMediaItemPropertyLyrics]retain];
}
请帮忙。谢谢
I am Accessing ipod library in iphone application and showing title, lyrics and artwork of album.. I also want to show lyrics of songs. I have added lyrics in itunes and sync it with device.But my code is not showing lyrics ..
Example from here and code to get lyrics is :-
- (void)handleNowPlayingItemChanged:(id)notification {
// Ask the music player for the current song.
MPMediaItem *currentItem = self.musicPlayer.nowPlayingItem;
// Display the artist, album, and song name for the now-playing media item.
// These are all UILabels.
self.songLabel.text = [currentItem valueForProperty:MPMediaItemPropertyTitle];
self.artistLabel.text = [currentItem valueForProperty:MPMediaItemPropertyAlbumArtist];
self.albumLabel.text = [[currentItem valueForProperty:MPMediaItemPropertyLyrics]retain];
}
Please Help. Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)