objective-c array is only saving one object in it -
this have
for (pfobject *object in objects){ nsstring *address = object[@"address"]; addarray = [nsmutablearray arraywithobjects:address, nil]; } nslog(@"outside loop"); for(nsstring *add in addarray) { nslog(@"%@", add); }
the address string ends printing out amount of addresses inside loop if use nslog(@"%@", address); know address string changing next one. reason array shows last address , won't save first one.
addarray = [nsmutablearray array]; (pfobject *object in objects) { nsstring *address = object[@"address"]; [addarray addobject:address]; }
Comments
Post a Comment