Skip to content

Instantly share code, notes, and snippets.

@guntidheerajkumar
Last active August 29, 2015 14:24
Show Gist options
  • Save guntidheerajkumar/433488f83c3c38ac2880 to your computer and use it in GitHub Desktop.
Save guntidheerajkumar/433488f83c3c38ac2880 to your computer and use it in GitHub Desktop.
public SimpleTabBarController ()
{
Title = "Sample Tab Bar";
EdgesForExtendedLayout = UIRectEdge.None;
TabBar.Frame = new CGRect (0, 70, TabBar.Frame.Width, TabBar.Frame.Height);
tab1 = new UIViewController ();
tab1.Title = "Green";
tab1.View.BackgroundColor = UIColor.Green;
tab2 = new UIViewController ();
tab2.Title = "Orange";
tab2.View.BackgroundColor = UIColor.Orange;
tab3 = new UIViewController ();
tab3.Title = "Red";
tab3.View.BackgroundColor = UIColor.Red;
var tabs = new UIViewController [] {
tab1, tab2, tab3
};
ViewControllers = tabs;
TabBar.ItemPositioning = UITabBarItemPositioning.Centered;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment