I have a basic question. While taking data for my table view in objective C. There are three diff fields image,title,description. So my is question whether I should make 3 diff NSArrays for them or just make a class of three variable and make a array of objects for better efficiency.
taking 3 arrays :
NSArray *image = [NSArray withObjects : @"one.jpg",@"two.jpg",nil];
NSArray *title = [NSArray withObjects : @"one",@"two",nil];
NSArray *description = [NSArray withObjects : @"number one",@"number two",nil];
or
User *dataOne = [User new]
dataOne.image= @"one.jpg";
dataOne.title = @"one";
dataOne.description =@"Number One";
User *dataTwo = [User new]
dataTwo.image= @"one.jpg";
dataTwo.title = @"one";
dataTwo.description =@"Number One";
NSArray *data = [NSArray dataOne,dataTwo, nil];
which is better approach ? please explain clearly. thank you