Created
September 25, 2011 03:47
-
-
Save anujb/1240204 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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