Могу ли я создать секционированный UITableView с MonoTouch.Dialog с алфавитной навигацией?
В MonoTouch я создаю секционные UITableViews примерно так:
public EntityDataSource(UIViewController controller)
{
_controller = controller;
this._entities = repository.GetEntities();
sectionTitles = (from r in _entities
orderby r.StartsWith
select r.StartsWith).Distinct().ToList();
foreach (var entity in _entities)
{
int sectionNumber = sectionTitles.IndexOf(entity.StartsWith);
if (sectionElements.ContainsKey(sectionNumber)) {
sectionElements[sectionNumber].Add(entity);
}
else {
sectionElements.Add(sectionNumber, new List<Entity>() {entity});
}
}
}
public override int NumberOfSections (UITableView tableView)
{
return sectionTitles.Count;
}
public override string TitleForHeader (UITableView tableView, int section)
{
return sectionTitles[section];
}
public override string[] SectionIndexTitles (UITableView tableView)
{
return sectionTitles.ToArray();
}
public override int RowsInSection (UITableView tableview, int section)
{
return sectionElements[section].Count();
}
Я хочу сделать то же самое, но с MonoTouch.Dialog. Это возможно?