Muhamméd Muhamméd - 4 months ago 74x
Swift Question

Passing dynamic array to ImageSlideshow ios

Iam trying to use **ImageSlideshow
** library

and i followed the documentation step by step and it's working perfectly

but i can only pass static images and here's my code :

slideShow.setImageInputs([AFURLSource(urlString: "")!, AFURLSource(urlString: "")!, AFURLSource(urlString: "")!])

But i need to get the images url from JSON array dynamically and pass it to slideshow like that :

var jsonArray:NSarray = [String]


any idea how can i do that ?


try this :

let arr = { AFURLSource(urlString: $0 as! String)!}

hope it be helpful :-)