It's right there in the description at the link you provided.
If you're asking how to do it in Swift:
func textTagCollectionView(_ textTagCollectionView: TTGTextTagCollectionView!, didTapTag tagText: String!, at index: UInt, selected: Bool, tagConfig config: TTGTextTagConfig!) {
// Tag was tapped... do what you want
print("Index:", index, "Selected:", selected, "TagText:", tagText ?? "No Text")
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…