Skip to content

Instantly share code, notes, and snippets.

@anujb
Created September 25, 2011 03:47
Show Gist options
  • Save anujb/1240204 to your computer and use it in GitHub Desktop.
Save anujb/1240204 to your computer and use it in GitHub Desktop.
public class TreatmentViewController : DialogViewController
{
public TreatmentViewController()
: base(UITableViewStyle.Plain, new RootElement(""))
{
}
public override void ViewDidLoad()
{
Root.Add(new Section("A")
{
new StringElement("Foo"),
new StringElement("Bar"),
new StringElement("Baz"),
});
base.ViewDidLoad();
}
public override Source CreateSizingSource(bool unevenRows)
{
return new FooSource(this);
}
public class FooSource : Source
{
public FooSource(DialogViewController dvc)
: base(dvc)
{
}
[Export ("sectionIndexTitlesForTableView:")]
public NSArray SectionTitles(UITableView tableView)
{
return NSArray.FromStrings(Enumerable.Range(200, 300).Select(x=>x.ToString()).ToArray());
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment