@interface SimataDetailViewController ()
@property Simata *simata;
@property (nonatomic, copy) NSMutableArray *simataList;
@end
@implementation SimataDetailViewController
@synthesize simataDataController=_simataDataController;
@synthesize category=_category;
@synthesize simata=_simata;
@synthesize simataList=_simataList;
#pragma mark - Managing the detail item
- (void) getSimataForCategory: (NSString *) inputCategory {
unsigned count = [self.simataDataController.masterList2 count];
while (count--) {
if ([[[self.simataDataController objectSimataInListAtIndex:count] categoryCode] isEqual:inputCategory]){
self.simata= [self.simataDataController objectSimataInListAtIndex:count];
[self.simataList addObject:self.simata];
}
}
NSLog(@"count, %u", [self.simataList count]);
}
Здравствуйте, это мой первый пост, поэтому наберитесь терпения.
Я пытаюсь добавить объект self.simata
в массив self.simataList
, но массив остается с нулевыми объектами.Объект self.simata
не является nil
, и я не получаю никакой ошибки.
Что я делаю не так?