[IOS] a line of code adds an index to a Chinese Array
/*** Return the original data and the empty array that stores the index to return the sorted array * used classification encapsulation, directly introduce the header file to use the method ** https://github.com/KKKKaras/JY_SectionDemo */# import JYTableViewController. h # import ChineseString. h # import NSObject + Index. h @ interface JYTableViewController () {NSMutableArray * _ listArray; // NSMutableArray * _ AbcSort; // sorted array NSMutableArray * _ sectionHeadsKeys; // array for storing indexes} @ end @ implementation JYTableViewController-(void) viewDidLoad {[super viewDidLoad]; _ AbcSort = [[NSMutableArray alloc] init]; _ sectionHeadsKeys = [[NSMutableArray alloc] init]; _ listArray = [[NSMutableArray alloc] initWithObjects: @ Bai Juyi, @ Liu Jingtao, @ Mo Yu, @ Wang yinfeng, @ Tang Xia, @ Li Bai, @ Du Fu, nil]; // get data _ AbcSort = [self getChineseStringArr: _ listArray andSck: _ sectionHeadsKeys];}