You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let hashtag = DetectionTuner {
Attrs(self.hashMentionAttr).akaLink($0.text)
}
How can i detect the tap action on hashtag or mention, with the respective tapped value.
It was there in this library before as a closure, now i am not able to get it after the update.
@psharanda iam using AttributedLabel, here it have this DetectionTuner property.
Which can only help in opening to some specific link.
I want to detect user tap action in mention and hashtag, to open/ redirect within the app.
Whichs not possible with
let hashtag = DetectionTuner {
Attrs(self.hashMentionAttr).akaLink($0.text)
}
this library previously had this, which seems to be missing now or iam i missing it ?
Ok, I see now. AttributedLabel is now working only with untyped string urls and not aware about Atributika lib at all and can be used without it. Check AttributedLabelDemoViewController.swift for the example. Using DetectionTuner tuner you can transform a mention or hashtag into any url format you want e.g. "hashtag://my_hashtag" and then in tap handler you can check the url schema and do the stuff you wanted to do for hashtags.
Activity
SreelekhN commentedon May 28, 2024
@psharanda any help ?
Kinda urgent to know
psharanda commentedon May 28, 2024
You may want to use AttributedLabel view, which is a part of AtributikaViews lib
SreelekhN commentedon May 28, 2024
@psharanda iam using AttributedLabel, here it have this DetectionTuner property.
Which can only help in opening to some specific link.
I want to detect user tap action in mention and hashtag, to open/ redirect within the app.
Whichs not possible with
let hashtag = DetectionTuner {
Attrs(self.hashMentionAttr).akaLink($0.text)
}
this library previously had this, which seems to be missing now or iam i missing it ?
psharanda commentedon May 28, 2024
Ok, I see now. AttributedLabel is now working only with untyped string urls and not aware about Atributika lib at all and can be used without it. Check AttributedLabelDemoViewController.swift for the example. Using DetectionTuner tuner you can transform a mention or hashtag into any url format you want e.g. "hashtag://my_hashtag" and then in tap handler you can check the url schema and do the stuff you wanted to do for hashtags.