1

I'm looking for an solution to display my artwork like in the apple music application. I'm able to load one artwork for the playlist but I want to be able to show 4 of the artworks as a playlist representative.

Currently I'm using this code for my playlist view

let objects = items.objectAtIndex(indexPath.item) as! MPMediaItemCollection
        let repObjects = objects.representativeItem

        cell.lbl_Name.text = objects.valueForProperty(MPMediaPlaylistPropertyName) as? String

        let artwork = repObjects?.valueForProperty(MPMediaItemPropertyArtwork)

        let artworkImage = artwork?.imageWithSize(CGSize(width: 130, height: 130))

        if(artworkImage != nil){
            cell.img_artwork.image = artworkImage
        }
        else{
            cell.img_artwork.image = UIImage(named: "no_Artwork.png")
        }

What would be the best way to go at this

NoSixties
  • 2,443
  • 2
  • 28
  • 65

0 Answers0