I have an NSMutableArray
@interface DetailViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> {
NSMutableArray *reponses;
}
@property (nonatomic, retain) NSMutableArray *reponses;
@end
and i'm trying to add in my array NSInteger object:
@synthesize reponses;
NSInteger val2 = [indexPath row];
[reponses addObject:[NSNumber numberWithInteger:val2]];
NSLog(@"the array is %@ and the value is %i",reponses, val2);
it won't work the object was not added to the array, this is what console shows:
the array is (null) and the value is 2