@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]);
}
Hello this is my first post, so please be patient.
I am trying to add object self.simata
to array self.simataList
but the array stays with zero objects. The object self.simata
is not nil
and I don't get any error.
What am I doing wrong?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…