开发者

Three20 titleForHeaderInSection

开发者 https://www.devze.com 2023-04-10 04:35 出处:网络
Here is what I added. It just lists all the objectsForCharacters under each one of the alphabet characters.

Here is what I added. It just lists all the objectsForCharacters under each one of the alphabet characters.

- (void)tableViewDidLoadModel:(UITableView*)tableView {
items = [[NSMutableArray alloc] init];
arrayOfCharacters = [[NSMutableArray alloc]init];
objectsForCharacters = [[NSMutableDictionary alloc]init];  
    NSMutableArray *arrayOfNames = [[NSMutableArray alloc]init];
for (Kid_CareAppDelegate_City* post in _searchFeedModel.posts) {
    [arrayOfNames addObject:post.city];
    [items addObject:[TTTableTextItem itemWithText:post.city 
                                               URL:[NSString stringWithFormat:@"tt://city?to=%@",[post.city stringByReplacingOccurrencesOfString:@" " withString:@"+"]]]];
}
for(char c='A';c<='Z';c++){
    [arrayOfCharacters addObject:[NSString stringWithFormat:@"%c",c]];
    [objectsForCharacters setObject:arrayOfNames forKey:[NSString stringWithFormat:@"%c",c]];
}
NSLog(@"Array %@",arrayOfCharacters);
NSLog(@"Dict %@",objectsForCharacters);
    TT_REL开发者_开发百科EASE_SAFELY(arrayOfNames);

self.items = items;
TT_RELEASE_SAFELY(items);
}


you can check out the link.http://blog.webscale.co.in/?p=240

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号