-
-
Save Clancey/2970868 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
class MyTabBarController () : UITabBarController | |
{ | |
public MyTabBarController () : base () | |
{ | |
} | |
public override void ViewWillAppear (bool animated) | |
{ | |
base.ViewWillAppear (animated); | |
var tabBarControllers = new UIViewController[] { | |
new UINavigationController(new MyDialogViewController () { | |
TabBarItem = new UITabBarItem ("Tab 1", Image, 0) | |
}), | |
new UINavigationController(new MyDialogViewController () { | |
TabBarItem = new UITabBarItem ("Tab 2", Image, 0) | |
}) | |
}; | |
this.SetViewControllers (tabBarControllers, true); | |
this.Title = "TabBarController Title"; | |
} | |
} | |
class MyDialogViewController () : DialogViewController | |
{ | |
public MyDialogViewController () : base (null) | |
{ | |
} | |
public override void ViewWillAppear (bool animated) | |
{ | |
this.Root = CreateRoot (); | |
} | |
RootElement CreateRoot () | |
{ | |
var root = new RootElement ("Root Element") { | |
new Section ("Radio Group") { | |
CreateRoot_RadioSelections () | |
} | |
}; | |
return root; | |
} | |
RootElementWithEvents CreateRoot_RadioSelections () | |
{ | |
// Populate the elements | |
var radioGroup = new RadioGroup (0); | |
var section = new Section (); | |
for (int i = 0; i < 10; i++) { | |
section.Add (new RadioElement (i.ToString ())); | |
} | |
var element = new RootElementWithEvents("Delivery Priority", radioGroup) { | |
section | |
}; | |
return element; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment