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

你好 请教个问题 #2

Open
jj89757hhb opened this issue Oct 14, 2016 · 0 comments
Open

你好 请教个问题 #2

jj89757hhb opened this issue Oct 14, 2016 · 0 comments

Comments

@jj89757hhb
Copy link

class_addMethod([self.person class], @selector(guess), (IMP)guessAnswer, "v@:");
if ([self.person respondsToSelector:@selector(guess)]) {
//Method method = class_getInstanceMethod([self.xiaoMing class], @selector(guess));
[self.person performSelector:@selector(guess)];

} else{
    NSLog(@"Sorry,I don't know");
}

这个意思是不是如果没有 guess 方法 就调用 guessAnswer方法?

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

1 participant