NSMutableArray があります
@interface DetailViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> {
NSMutableArray *reponses;
}
@property (nonatomic, retain) NSMutableArray *reponses;
@end
そして、配列 NSInteger オブジェクトに追加しようとしています:
@synthesize reponses;
NSInteger val2 = [indexPath row];
[reponses addObject:[NSNumber numberWithInteger:val2]];
NSLog(@"the array is %@ and the value is %i",reponses, val2);
オブジェクトが配列に追加されていないと機能しません。これがコンソールに表示されるものです。
the array is (null) and the value is 2