Is it possible to do arithmetics using Obj-C Key-Value Coding? I am looking for something like this:
[obj valueForKeyPath:@"(val1+val2)"]
or do you have to implement a property that adds the two values manually?
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.
Arithmetic using KVC is not possible.
You can do arithmetic with strings and then pass it to
[obj valueforKeyPath:...]as :