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

valueForKey "Too many arguments to function call, expected 0, have 3" #76

Open
AndersDJohnson opened this issue Jun 16, 2015 · 1 comment

Comments

@AndersDJohnson
Copy link

Due to alleged errors with the valueForKey method such as "Too many arguments to function call, expected 0, have 3", around this line:

IMP valueForKey = (IMP)[objc_getAssociatedObject([self class], originalValueForKeyIMPKey) pointerValue];

XCode 5.1.1 refuses to compile this under iOS SDK 8.2 targeting iOS 7.0, after installing DCIntrospect 0.0.2 with cocoapods 0.37.2.

Any ideas?

AndersDJohnson pushed a commit to AndersDJohnson/DCIntrospect that referenced this issue Jun 16, 2015
@DevGuan
Copy link

DevGuan commented May 26, 2018

typedef id (* _rIMP)(id,SEL ,...);

IMP valueForKey = (IMP)[objc_getAssociatedObject([self class], originalValueForKeyIMPKey) pointerValue];
_rIMP func = (_rIMP)valueForKey;
if ([textInputTraitsProperties containsObject:key])
{
id textInputTraits = func(self, _cmd, @"textInputTraits");
return func(textInputTraits, _cmd, key);
}
else
{
return func(self, _cmd, key);
}

then it works

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

2 participants