I have the following code:
Product product = [[Product alloc] init];
product.title = tag;
[allProducts addObject:product];
NSString *pImage = [[NSString alloc] initWithFormat:p.title];
But it is failing to return anything
Can anyone kindly help me please?
THanks
Nothing in your code is trying to retrieve anything from a collection.
The line above is used for adding objects. If you are looking to retrieve an object you do:
Look at the documentation for NSArray and NSMutableArray.
–update–
Just noticed you have an error in your code:
(you left out the *)