Tag: 封面

在ios中从epub获取封面图片

我想在我的阅读表中显示epub文件的封面图片。 在我的iOS应用程序中,我添加了“Open In”支持epub文件。 所以,当我导航到我的书阅读应用程序,我想先在书架上显示书籍的封面图像,然后要加载该书。 请帮助我从epub书籍获取封面图片在iOS应用程序。

在iTunes中可以使用封面时,MPMediaItemArtwork为空

UIImage “图片”始终是空的(“空”),虽然封面显示在音乐应用程序由苹果。 在iOS 7中,它工作正常,但与iOS 8我没有掩护。 我的代码有什么问题,或iOS 8中发生了什么变化? -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { AlbumCell *cell = [tableView dequeueReusableCellWithIdentifier:@"AlbumCell"]; MPMediaItemCollection *song = self.songsList[indexPath.row]; cell.albumName.text = [[song representativeItem] valueForProperty: MPMediaItemPropertyAlbumTitle]; cell.albumArtist.text = [[song representativeItem] valueForProperty:MPMediaItemPropertyAlbumArtist]; CGSize artworkImageViewSize = CGSizeMake(100, 100); MPMediaItemArtwork *artwork = [song valueForProperty:MPMediaItemPropertyArtwork]; UIImage *image = [artwork imageWithSize:artworkImageViewSize]; NSLog(@"——————-"); NSLog(@"%@",[[song representativeItem] valueForProperty: MPMediaItemPropertyAlbumTitle]); NSLog(@"%@",image); if […]