Stack Exchange
Compiler not keeping track of updated method declaration
I had this method that I was calling and everything was fine:
DataHandler:
.h:    
-(void)saveNumberOfTries:(NSString*)numberOfTries toWord:(NSString *)indexOfWord;
.m:
-(void)saveNumberOfTries:(NSString*)numberOfTries toWord:(NSString *)indexOfWord {...}

ViewController.m
DataHandler *dataHandler = [[DataHandler alloc] init];
[dataHandler performSelector:@selector(saveNumberOfTries:toWord:) withObject:numberOfTries withObject:wordId];

..I then updated it to take one more argument:
DataHandler:
.h:    
-(void)saveNumberOfTries:(NSString*)numberOfTries toWord:(NSString *)indexOfWord currentLevel:(NSString*)userSelectedLevel;

.m:
-(void)saveNumberOfTries:(NSString*)numberOfTries toWord:(NSString *)indexOfWord currentLevel:(NSString*)userSelectedLevel {...}

ViewController.m:
DataHandler *dataHandler = [[DataHandler alloc] init];

[dataHandler performSelector:@selector(saveNumberOfTries:toWord:currentLevel:) withObject:numberOfTries withObject:wordId withObject:selectedLevel];

But the compiler is now giving me "Receiver type 'DataHandler' for instance message does not declare a method with selector 'performSelector:withObject:withObject:withObject:'".
If I put in the original method call (without changing anything in the DataHandler) it doesn't give me any warnings although the method no longer exists. It seems Xcode isn't keeping up with my changes. Any ideas or suggestions? 

Because there is no method like performSelector:withObject:withObject:withObject:
You can compress into NSArray or NSDictionary and then use performSelector:withObject:withObject:
Like in your case-
-(void)saveNumberOfTries:(NSString*)numberOfTries toWordWithCurrentLevel:(NSDictionary *)wordAndLevel;

Other way if you don't want to change definition of method, you can try like below then it will work fine -
[dataHandler saveNumberOfTries:numberOfTries toWord:wordId currentLevel:selectedLevel];


Sweet. Thanks! Out of curiosity - is it not possible to have more than two arguments?

Correct!!!performSelector is restricted to two argument, although like i had suggested above, we can have a workaround for that using NSArray or NSDictionary.
