Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In delegate method of <code>OAHAtrributedLabel</code> return <code>NO</code>.</p> <pre><code>-(BOOL)attributedLabel:(OHAttributedLabel*)attributedLabel shouldFollowLink:(NSTextCheckingResult*)linkInfo{ &lt;Do your work here&gt; return NO; } </code></pre> <p><strong>EDIT</strong> I couldn't run your code. SO I'm posting the code that I have worked with.</p> <pre><code>//forgotPasswordlabel is my OHAttributedLabel self.forgotPasswordlabel.text = [[NSString localizedStringForKey:@"forgot_password"] uppercaseString]; self.forgotPasswordlabel.delegate = self; NSRegularExpression* userRegex = [NSRegularExpression regularExpressionWithPattern:[[NSString localizedStringForKey:@"forgot_password"] uppercaseString] options:0 error:nil]; [userRegex enumerateMatchesInString:self.forgotPasswordlabel.text options:0 range:NSMakeRange(0,self.forgotPasswordlabel.text.length) usingBlock:^(NSTextCheckingResult *match, NSMatchingFlags flags, BOOL *stop) { // FORGOT_PASSWORD_URL is mu URL which I'm opening in my WebView [self.forgotPasswordlabel addCustomLink:[NSURL URLWithString:FORGOT_PASSWORD_URL] inRange:match.range]; // add it }]; </code></pre> <p>ANd in delegate method</p> <pre><code>-(BOOL)attributedLabel:(OHAttributedLabel*)attributedLabel shouldFollowLink:(NSTextCheckingResult*)linkInfo{ [self forgetPassword:nil]; // here I handle password reset action return NO; } </code></pre> <p>Hee is a look at appearnce of my Label <img src="https://i.stack.imgur.com/h5m8H.png" alt="enter image description here"></p> <p>Hope it helps...</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload