ElaWorkshop / TagListView

Simple and highly customizable iOS tag list view, in Swift.
MIT License
2.63k stars 492 forks source link

How to get selected tag index? #253

Open VigneshVV opened 4 years ago

VigneshVV commented 4 years ago

How to get selected tag index?

MattiaConfalonieri commented 4 years ago

The same question for me, do you have found a solution?

VigneshVV commented 4 years ago

Honestly , there is no option.

On Sat, 11 Apr 2020 at 9:55 PM, Mattia Confalonieri < notifications@github.com> wrote:

The same question for me, do you have found a solution?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ElaWorkshop/TagListView/issues/253#issuecomment-612457571, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACFBEVJ5WERZJNICZYGD6M3RMCKWDANCNFSM4MC3UMAA .

-- Vignesh

mayurboda commented 4 years ago

you can get index in delegate method like following.

func tagPressed(_ title: String, tagView: TagView, sender: TagListView) {
        if let index = sender.tagViews.index(of: tagView) {
            print(index)
        }
}

its work for me.