2
我有一個應用程序,它顯示從iPod
庫中選擇的歌曲中的藝術作品,並希望不斷旋轉。如何在iPhone中旋轉iOS中的圖像?
到目前爲止的代碼如下:
-(void)chosen:(MPMediaItem*)song withObject:(id)obj
{
AppDelegate* app = (AppDelegate*)[[UIApplication sharedApplication] delegate];
//ARTWORK STUFF
UIImage *artworkImage = [UIImage imageNamed:@"noArtworkImage.png"]
MPMediaItemArtwork *artwork = [song valueForProperty: MPMediaItemPropertyArtwork];
if (artwork)
{
artworkImage = [artwork imageWithSize: CGSizeMake (200, 200) ];
}
[app.viewController.artworkImage1 setImage:artworkImage];
}
這工作完美無瑕,非常感謝。 –