0
votes

I have a datePicker and I trying send the value but don't working it.

The Error:

-[__NSDate length]: unrecognized selector sent to instance 0x8ee2330 2014-06-30 13:49:42.602 Golf Tipp[2374:60b] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDate length]: unrecognized selector sent to instance 0x8ee2330'

**My Code:**

Confirmacion *cuartoView = (Confirmacion *)[segue destinationViewController];
NSDate *date = [self.fecha_hora date];
cuartoView.fecha = date;
1
Provide the code for fecha_hora. a NSDate instance is being sent the length` message which it does not have. Add that to the question. - zaph

1 Answers

0
votes

You have an object of type NSDate. And somewhere you have code that believes the object is an NSString or maybe NSData (not NSDate), and sends a length message to it.

The usual way to find the problem is either: Stare at your code long and hard. Or: Set an exception breakpoint in Xcode and find where the problem happens, and deduce from that what you did wrong. If you don't know how to set an exception breakpoint in Xcode, feel free to use Google.