私はsqliteで名前でデータを並べ替えました:
char*sql="SELECT* FROM tblcocktail ORDER BY drinkname ;";
文字でソートされた表に表示する方法がわかりません:アドバイスしてください:)
-(void)viewDidAppear:(BOOL)animated
{
Cocktails*cock=[[Cocktails alloc]init];
_arrcocktail=[cock getallcocktail];
[self.tableView reloadData];
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
// Return the number of sections.
return [_arr count]; //all the letters
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
//i don't not what to put here so it will show me the right name under the right letter
}