I am doing the comparison:
else if([change doubleValue] == 0 && indexPath.row == sectionRows - 1)
how can I check for the case where [change doubleValue] doesn’t return anything?
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.
There’s no way the
doubleValuemethod goes without returning anything. The least value you can check for is0. The following are the cases the doubleValue returns 0.stringdoesn’t contain a valid numerical value.stringisnil.stringactually contains@"0".Checking for a valid number
Use NSPredicate to test if the string contains a numerical value.