TNImageSliderViewController icon indicating copy to clipboard operation
TNImageSliderViewController copied to clipboard

Image from URL

Open harshmaur opened this issue 8 years ago • 4 comments

Hey,

How do I load the image from URL?

harshmaur avatar May 22 '16 12:05 harshmaur

I just figured it out.

harshmaur avatar May 22 '16 13:05 harshmaur

Please, can you provide your way here? @harshmaur

mhtranbn avatar May 31 '16 07:05 mhtranbn

Instead of loading the images from assets, you can do something like.


var imageData:[UIImage] = []

for data in swiftyVar["data"].arrayObject! {
    let imageString = NSURL(string: "http://example.com/image.png")                
    let data = NSData(contentsOfURL: imageString!)
    imageData.append(UIImage(data: data!)!)
}
self.imageSliderVC.images = imageData

However It is going to block the UI, I havent figured out how to load the image async with TNSlider.

harshmaur avatar May 31 '16 10:05 harshmaur

thank you, 100000000 thank

2016-05-31 17:15 GMT+07:00 Harsh Maur [email protected]:

Reopened #15 https://github.com/frederik-jacques/TNImageSliderViewController/issues/15 .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/frederik-jacques/TNImageSliderViewController/issues/15#event-676796882, or mute the thread https://github.com/notifications/unsubscribe/AIKUHHi59bRodaMw0_iUmkEs56GfytMnks5qHAo_gaJpZM4Ij-yw .

mhtranbn avatar Jun 01 '16 05:06 mhtranbn