Reputation: 97
I am setting html text to UITextView and set UIDataDetectorTypeLink to DataDetectorTypes but its not working.below is code:`
self.dictHelp =[NSMutableDictionary dictionaryWithDictionary:response];
[self.txtView setValue:[self.dictHelp valueForKey:@"HelpText"] forKey:@"contentToHTMLString"];
self.txtView.userInteractionEnabled = YES;
[self.txtView setDataDetectorTypes:UIDataDetectorTypeLink];`
Text value is "If you need assistance please contact XXXX at [email protected]" what am i doing wrong?
Upvotes: 0
Views: 1111
Reputation: 2654
Please try with below way -
self.txtView.text = nil;
[self.txtView setValue:nil forKey:@"contentToHTMLString"];
[self.txtView setValue:[self.dictHelp valueForKey:@"HelpText"] forKey:@"contentToHTMLString"];
Upvotes: 0