FRHyperLabel icon indicating copy to clipboard operation
FRHyperLabel copied to clipboard

unrecognized selector sent to instance

Open askari01 opened this issue 8 years ago • 3 comments

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UILabel setLinksForSubstrings:withLinkHandler:]: unrecognized selector sent to instance

your code with bit modification: void(^handler)(FRHyperLabel *label, NSString *substring) = ^(FRHyperLabel *label, NSString *substring){ UIAlertController *controller = [UIAlertController alertControllerWithTitle:substring message:nil preferredStyle:UIAlertControllerStyleAlert]; [controller addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil]]; [self presentViewController:controller animated:YES completion:nil]; };

//Step 3: Add link substrings
[label1 setLinksForSubstrings:@[@"to", @"and", @"in", @"of", @"are"] withLinkHandler:handler];

what can be the issue

askari01 avatar Jul 21 '17 08:07 askari01

I am also getting this issue. Did anyone solve it?

piyushg098 avatar Sep 23 '19 04:09 piyushg098

Dont select module and dont inherit class

Screenshot 2019-12-26 at 4 43 11 PM

octal-sourabh avatar Dec 26 '19 11:12 octal-sourabh

Arey bhai koi dusra solution?

dhruvcoderkube avatar Jan 24 '23 07:01 dhruvcoderkube