how can i ask an array if it contains an item and if it does it to [[NSArray alloc] initWithObjects:@"those objects" automatically. this is my fav .h
@interface FavoriteViewController : UITableViewController {
NSMutableArray *favoritesArray;
NSMutableArray *didContain;
}
@property (nonatomic, retain) NSMutableArray *favoritesArray;
@property (nonatomic, retain) NSMutableArray *didContain;
this is the .m
favoritesArray = [[NSMutableArray alloc]init];
didContain = [[NSMutableArray alloc]init];
if
([favoritesArray containsObject:@"one"])
{
[didContain addObject:@"one"];
}
and in the detail view controller.m i have this code
[[NSMutableArray alloc] init];
[favoritesArray addObject: @"one"];
i get the table to work however nothing shows up....