Tengo una NSMutableArrayañadiendo objeto NSInteger a NSMutableArray
@interface DetailViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> {
NSMutableArray *reponses;
}
@property (nonatomic, retain) NSMutableArray *reponses;
@end
y estoy tratando de agregar en mi arsenal NSInteger objeto:
@synthesize reponses;
NSInteger val2 = [indexPath row];
[reponses addObject:[NSNumber numberWithInteger:val2]];
NSLog(@"the array is %@ and the value is %i",reponses, val2);
no funcionará el objeto no ha sido añadido a la matriz, esto es lo que muestra la consola:
the array is (null) and the value is 2
es correcto thx –