What does the error "unrecognized selector sent to instance" mean in Xcode -


What it means "sent to unrecognized selector for example" in Xcode < / Code>?

This means that the method is not defined or on the other side, on which a method is calling the wrong object .

The classic example of this error is missing from ':' in the selector's call.

  UIBarButtonItem * doneBtn = [[UIBarButtonItem alloc] initWithBarButtonSystemItem: UIBarButtonSystemItemDone Target: Self-action: @selector (DatePickerDoneClick)];   

here,

  verb: @selector (DatePickerDoneClick :)   

is expected

  Actions: @selector (DatePickerDoneClick)    

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -