I found this problem, which is very weird.
- (void)imageMove:(float)xx y:(NSInteger)yy
{
NSLog(@"xx=%f,----yy=%d",xx,yy);
}
when I call this function:
[self imageMove:50 y:50];
the log shows: xx=0.000000,—-yy=50
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You’re confusing yourself somehow. When I try doing what you said, I get this:
Since that isn’t what you get, you must be doing something different from what you say you’re doing. For example, you might be calling
imageMovefrom somewhere else that you’ve forgotten about. Put a breakpoint on yourNSLogline and work your way back through the call stack to see what’s really happening. Also, that way you can see what valuexxactually has when it arrives as an argument.