I have a person with setter / getter… Now i’m looping an array of that person object. how do i assign the element to a new person.
for (int i =0; i<[people count]; i++)
{
Person *p = [people objectAtIndex:i];
nsLog(@"%@", [p id]);
}
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.
well you’re doing it right, except nslog…it should be:
NSLog("%@",p);as for a speed thing…use fast enumeration..like this:
note that i don’t know how
Personis created…if there is a problem it’s there