evgenyneu / Auk

An image slideshow for iOS written in Swift.
MIT License
277 stars 44 forks source link

single image,not downloaded from url #46

Closed valentinjahanmanesh closed 7 years ago

valentinjahanmanesh commented 8 years ago

hi, maybe its weird or there is something that i dont know about auks settings... but when there is just one image in the slider, library doesn't download it... i am using it to show products images, but some of them has only one image, for this products, slider wouldn't download that one

evgenyneu commented 8 years ago

Hi, @farshadjahanmanesh, thank you for bringing it up. Could you give a URL to the image so I can try it?

valentinjahanmanesh commented 8 years ago

yeah sure here you are, http://solooxygen.ir/host/solooxygen/rescue/sol/Emergency/1.jpg

i tested it, when there is just one image, slider wouldn't download it, but i added same image for two times in slider array, and it worked

`
func bindImages(){ img_slider.auk.settings.placeholderImage = UIImage.PlaceHolder() img_slider.auk.settings.pagingEnabled = true img_slider.auk.settings.showsHorizontalScrollIndicator = true if (sliderType == SliderType.HomePage.rawValue) { img_slider.auk.settings.contentMode = UIViewContentMode.ScaleAspectFill }else{ img_slider.auk.settings.contentMode = UIViewContentMode.ScaleAspectFit

    }
    img_slider.auk.settings.preloadRemoteImagesAround = 2
    img_slider.auk.startAutoScroll(delaySeconds: 5)
    for slide in Slides {
        img_slider.auk.show(url: slide.image)
    }
    if let cb = callback
    {cb(complete: img_slider)}
    loadingDismis()
}

`

` static func GetSliderFormat(slides : [ProductSlides])->[SliderModel]?{ var list=[SliderModel]()

    for item in slides {
        let newmodel=SliderModel()
        newmodel.image=item.image

//this line, same image added to array two times and slider worked list.append(newmodel) list.append(newmodel) }

    if(list.count==0){
        return nil
    }
    return list
}

`

evgenyneu commented 8 years ago

Hello @farshadjahanmanesh, thanks for the example code. I could not reproduce this issue, unfortunately. I have created a demo app with it and it works for me both on an iOS 9 device and in the iOS 10 simulator. Here is the Xcode 8 beta 6 project. Do you think there are other factors that may be causing this problem?

UsingAuk.zip

valentinjahanmanesh commented 8 years ago

thanks for your supporting... hum, i think this issue is because that i am using old version, pod 'Auk', '~> 2.1' ... i afraid of migrating to swift 3

evgenyneu commented 8 years ago

No worries, let me know if you can find a solution to this. It may still be an issue with the library, it is just that I could not reproduce it in my environment.

evgenyneu commented 7 years ago

Closing the issue, feel free to reopen if needed.

masbenx commented 7 years ago

sorry to reopen this..

when I use scrollview.auk.settings.contentMode = .scaleAspectFill one image last always gone

but when i disable contentMode, all image can load without resizing.

evgenyneu commented 7 years ago

Thanks for letting me know @masbenx, do you mean that last image is not shown?

Could you give me URLs to the images so I can test them?

evgenyneu commented 7 years ago

@masbenx, I created a demo app that uses .scaleAspectFill content mode and shows two remote images. The second images shows up for me, so I could not reproduce your problem. Am I missing something?

Please find the demo project attached. AukScaleAspectFill.zip

evgenyneu commented 7 years ago

Closing the issue, feel free to reopen if needed.