Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unrecognized selector sent to instance #28

Open
askari01 opened this issue Jul 21, 2017 · 3 comments
Open

unrecognized selector sent to instance #28

askari01 opened this issue Jul 21, 2017 · 3 comments

Comments

@askari01
Copy link

*** 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

@piyushg098
Copy link

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

@octal-sourabh
Copy link

Dont select module and dont inherit class

Screenshot 2019-12-26 at 4 43 11 PM

@dhruvcoderkube
Copy link

Arey bhai koi dusra solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants