我有这本词典:
" a) 2012 UN NEWNW" = (
"2012/06/04 Saudi Arabia Huge Sandstorm",
"2012/05/27 Niger Huge Sandstorm"
);
" b) 2012 DEUX " = (
"2011/03/30 Niger Huge Sandstorm"
);
" c) just for TROIS" = (
"2011/03/30 AHuge Sandstorm over niger",
"2011/03/30 BHuge Sandstorm over niger",
"2011/03/30 CHuge Sandstorm over niger",
"2011/03/30 1Huge Sandstorm over niger",
"2011/03/30 2Huge Sandstorm over niger",
"2011/03/30 3Huge Sandstorm over niger",
"2011/03/30 4Huge Sandstorm over niger",
"2011/03/30 5CHuge Sandstorm over niger",
"2011/03/30 6Huge Sandstorm over niger "
);
" d) ****** QUATRE" = (
"2011/03/30 7Huge Sandstorm over niger",
"2011/03/30 8Huge Sandstorm over niger",
"2011/03/30 9CHuge Sandstorm over niger",
"2011/03/30 AHuge Sandstorm over niger",
"2011/03/30 B10CHuge Sandstorm over niger",
"2011/03/30 **CHuge Sandstorm over niger",
""
);
并使用此代码:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = (UITableViewCell *) [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier];
}
// Configure the cell...
//---------- CELL BACKGROUND IMAGE -----------------------------
UIImageView *imageView = [[UIImageView alloc] initWithFrame:cell.frame];
UIImage *image = [UIImage imageNamed:@"LightGrey.png"];
imageView.image = image;
cell.backgroundView = imageView;
[[cell textLabel] setBackgroundColor:[UIColor clearColor]];
[[cell detailTextLabel] setBackgroundColor:[UIColor clearColor]];
NSArray *allKeys = [states allKeys];
NSString *curKey = [allKeys objectAtIndex:indexPath.section];
NSArray *curArray = [states objectForKey:curKey];
curValue = [curArray objectAtIndex:indexPath.row];
//Arrow
cell.textLabel.text = curValue;
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
[[cell textLabel] setFont:[UIFont systemFontOfSize:12.0]];
return cell;
}
部分顺序是 c) b) a) d) 谁能帮帮我?