Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First Slider Image not visible first time #18

Open
ajoykarmakar459 opened this issue Sep 12, 2018 · 2 comments
Open

First Slider Image not visible first time #18

ajoykarmakar459 opened this issue Sep 12, 2018 · 2 comments

Comments

@ajoykarmakar459
Copy link

ajoykarmakar459 commented Sep 12, 2018

First of all, I want to give you many many thanks for this awesome, sweet plugin. But the problem is in first load the first image of the slider is not visible, it's showing a blank white area. I check the same issue, but that doesn't work for me. Can you help on this matter? Advance thanks for your help. I just use this simple piece of code.

`
let pathArray = ["slider1",
"slider2",
"slider3"
]
titleArray = ["picture 1","picture 2","picture 3"]

    slider.delegate = self as? AACarouselDelegate
    
    slider.setCarouselData(paths: pathArray,  describedTitle: titleArray, isAutoScroll: true, timer: 10.0, defaultImage: "slider1")
    //optional methods
    slider.setCarouselOpaque(layer: true, describedTitle: false, pageIndicator: false)
    slider.setCarouselLayout(displayStyle: 0, pageIndicatorPositon: 5, pageIndicatorColor: nil, describedTitleColor: nil, layerColor: nil)`

or one more question can I set the default select number 2 image of the slider?

@ghost
Copy link

ghost commented Nov 27, 2018

Yes, am also facing the same issue...Could someone help me
If I run the project first time, it is showing last image from array

@swmooon
Copy link

swmooon commented Jun 28, 2019

Write this function and it will be solved.

func callBackFirstDisplayView(_ imageView: UIImageView, _ url: [String], _ index: Int) {

    imageView.kf.setImage(with: URL(string: url[index]),
                          placeholder: nil,
                          options: [.transition(.fade(1))],
                          progressBlock: nil,
                          completionHandler: nil)
}

Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants