目前我正在一行中填充一个数组,例如
self.monthMonths = [[NSArray alloc] initWithObjects:@"January", @"February", @"March", @"April", @"May", @"June",@"July",@"August",@"September",@"October",@"November",@"December", nil];
当我想从数据库中提取数据时,一次添加这些元素的语法是什么。我以一年中的月份为例。
while([results next]) {
NSString *months = [results stringForColumn:@"month"];
self.month = [[NSArray alloc] initWithObjects:@"month",nil];
//[NSArray
NSLog(@"Month: %@",month);
}