I am trying to add an integer to each elements in an NSMutableArray but could not find a way to do that. For example, trying to add 5 to an array of elements such as [3, 4, 7] to get [8,9,12].
any help would be great. thanks.
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.
Assuming that the items inside are
NSNumberobjects, you can do it like this: