I'm using a value transformer to transform the content array of a table content "bound" so I can edit the values before it pass to the views and it works
- (id)transformedValue:(id)value
{
NSArray *oldArr = value;
NSMutableArray *newArr = [[NSMutableArray alloc] init];
for(Metadata *meta in oldArr)
{
meta.title = @"hello";
[newArr addObject:meta];
[newArr addObject:meta];
}
return newArr;
}
the edit in values works, and reflecting in the UI
meta.title = @"hello";
BUT when I try to expand the array, instead of bound the table to an array of size 2, I want to expand it to be of size 4, by just duplicating them
for(Metadata *meta in arr)
{
meta.title = @"hello";
[newArr addObject:meta];
[newArr addObject:meta];
}
This isn't working and I got cells count of the old array how I can achieve what I want??
thanks