CGImageCreate:图像大小无效:0 x 0

时间:2015-11-18 02:44:23

标签: ios objective-c uiimage

NSMutableDictionary *songInfo = [[NSMutableDictionary alloc] init];
UIImage *image = [UIImage imageNamed:@"image2"];
MPMediaItemArtwork *albumArt = [[MPMediaItemArtwork alloc] initWithImage:image];
[songInfo setObject:@"Audio Title" forKey:MPMediaItemPropertyTitle];
songInfo setObject:@"Audio Author" forKey:MPMediaItemPropertyArtist];
[songInfo setObject:@"Audio Album" forKey:MPMediaItemPropertyAlbumTitle];
[songInfo setObject:albumArt forKey:MPMediaItemPropertyArtwork];
[[MPNowPlayingInfoCenter defaultCenter] setNowPlayingInfo:songInfo];

用户锁定应用屏幕

错误日志:

<Error>: CGImageCreate: invalid image size: 0 x 0.

1 个答案:

答案 0 :(得分:0)

LMRowView代码中添加图片扩展名。

相关问题