Q:

When I iterate data from an array using for loop I get only the last string and the above strings are overlapped

Name *myName = [[Name alloc] init];
    for (int i = 0; i<[nameArray count]; i++) {
        myName.name = [nameArray objectAtIndex:i];
        NSLog(@"Name: %@", myName.name);
        self.lblName.text = myName.name;
    }

where, 
          Name is NSObject Class.
          nameArray is a variable where I stored array objects.
          self.lblName is the outlet connected on view controller.  
Question is that, when I log myName.name it gives all data but when I tried to show this data in viewController(self.lblName.text) it gives the last object of an array.  
How could I solve this problem? Can anyone explain me the solution? 

A:

If you want all the names in one label you should append, not assign. What you do right now is just displaying the last object.
self.lblName.text = [NSString stringWithFormat:@"%@ %@",self.lblName.text, myName.name];

Maybe the better way to do so is to have string variable and use it later on to present it in UILabel:
Name *myName = [[Name alloc] init];
NSString *stringForLabel = @"";
for (int i = 0; i<[nameArray count]; i++) {
    myName.name = [nameArray objectAtIndex:i];
    NSLog(@"Name: %@", myName.name);
    stringForLabel = [NSString stringWithFormat:@"%@ %@",stringForLabel ,myName.name ];
}
self.lblName.text = stringForLabel;

