Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

swift array map to another array

self.imageViews = photoURLs.map()
{ 
    guard let data = NSData(contentsOf: $0), let image = UIImage(data: data)
    {
        return UIImageView(image: nil)
    }

    return UIImageView(image: image)
}
 
PREVIOUS NEXT
Tagged: #swift #array #map #array
ADD COMMENT
Topic
Name
9+4 =