簡體   English   中英

UITableView SectionIndexTitlesForTableView不拆分?

[英]UITableView SectionIndexTitlesForTableView not split?

請在這里需要一些幫助Section IndexTitles不拆分? 它看起來像圖像中的:

在此處輸入圖片說明

問題在於numberOfRowsInSection: 您需要具有一個由數組組成的數據結構。 外部數組的每個部分應有一個條目。 內部數組將具有該部分的行。

然后就像:

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    NSArray *rowData = listData[section];

    return rowData.count;
}

當然,您需要更新其他表視圖數據源方法來處理此更新的數據結構。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM