JanGorman / Agrume

🍋 A lemony fresh iOS image viewer written in Swift.
MIT License
790 stars 121 forks source link

StartIndex or CurrentIndex #337

Closed idrenn closed 1 year ago

idrenn commented 1 year ago

Hi Dear, Thank you for providing this wonderful library for image-viewer from local/remote sources. I have a problem regarding the image's current index or start index while presenting to the viewer. It always starts from the first image even if I pass the 5th start index, here is my code

let agrume = Agrume(urls: imgUrls, startIndex: 5, background: .blurred(.light), dismissal: .withButton(button)) agrume?.show(from: self)

Please help me to resolve this issue.

Thanks.

JanGorman commented 1 year ago

Hello,

Sorry to hear that this isn't working as intended. The example app includes an example of this use case: https://github.com/JanGorman/Agrume/blob/master/Example/Agrume%20Example/MultipleURLsCollectionViewController.swift#L45

I tested that and it works fine.

The code you shared looks correct but without additional context it's a bit tough to see what could be going one. Could you share a bit more code (or an example of the contents of imgUrls you're using) and which version of iOS + the library that you're using?

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you.

nahar-kh10 commented 5 months ago

same issue ,, I'm using the same code in example

It always start from the first image