zoukankan      html  css  js  c++  java
  • <UI>自定义UITableView的右侧索引

    // 右边索引的标题数组
    - (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView
    {
    NSMutableArray *array = [NSMutableArray array];
    for(int section='A';section<='Z';section++)
    {
    [array addObject:[NSString stringWithFormat:@"%c",section]];
    }
    return array;
    }
    // 自定义索引与数组的对应关系
    - (NSInteger)tableView:(UITableView *)tableView sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)index
    {
    return (index+1==26)?0:(index+1);
    }

  • 相关阅读:
    hw笔试题-01
    tcp
    linux schedule
    arm架构学习
    skyeye
    RTOS
    systemdump相关
    sdio
    linux kernel 多线程
    linux内核同步
  • 原文地址:https://www.cnblogs.com/robinkey/p/2870256.html
Copyright © 2011-2022 走看看