Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Monotouch - [NSConcreteValue doubleValue]: unrecognized selector sent to instance

This seems like a somewhat vague question - but tapping around in my UI I am getting a 'Unrecognized selector sent to instance '. The stack trace is really not very helpful. In general - what is the best way to debug this in Monodevelop? Any suggestions would be very helpful.

like image 498
Brandon Avatar asked Apr 02 '12 16:04

Brandon


1 Answers

The first answer is not a good solution. The transform.scale should be a double type, if you assign fromValue or toValue of CABasicAnimation a NSValue type, it cann't convert to double value, and so App crashed.

Wrong example:

     animation.fromValue = [NSValue valueWithCGSize:CGSizeMake(0.5, 0.5)];
     animation.toValue = [NSValue valueWithCGSize:CGSizeMake(1.2, 1.2)];

Right example:

     animation.fromValue = @(0.5);
     animation.toValue = @(1.2);
like image 64
xindong Avatar answered Oct 11 '22 23:10

xindong