{
//
//改变索引的颜色
cnAirportTabView.sectionIndexColor = [UIColor blueColor];
//改变索引选中的背景颜色
cnAirportTabView.sectionIndexTrackingBackgroundColor = [UIColor grayColor];
NSInteger count = 0;
NSLog(@"%@-%d",title,index);
xianshiLable =[[UILabel alloc]initWithFrame:CGRectMake(100, 100, 30, 30)];
xianshiLable.textColor =[UIColor blackColor];
xianshiLable.tag =999;
xianshiLable.backgroundColor =[UIColor redColor];
xianshiLable.textAlignment =NSTextAlignmentCenter;
xianshiLable.text =title;
[self.view addSubview:xianshiLable];
if (tableView == cnAirportTabView) {
NSLog(@"titleArraytitleArray:%@",titleArray);
for(NSString *character in titleArray){
NSLog(@"character:%@",character);
NSLog(@"titleArray:%@",titleArray);
NSLog(@"title:%@",title);
if([character isEqualToString:title]){
return count;
}
count ++;
}
} else if (tableView == searchResultTableView) {
for(NSString *character in searchTitles){
if([character isEqualToString:title]){
return count;
}
count ++;
}
}
return 0;
}