public override IList <UIViewController> GetViewControllers(PagerTabStripViewController pagerTabStripController) { var child_1 = new TableChildExampleViewController(UITableViewStyle.Plain, new IndicatorInfo("TableView")); var child_2 = new ChildExampleViewController(new IndicatorInfo("View")); var child_3 = new TableChildExampleViewController(UITableViewStyle.Grouped, new IndicatorInfo("Table View 2")); var child_4 = new ChildExampleViewController(new IndicatorInfo("View 2")); var child_5 = new TableChildExampleViewController(UITableViewStyle.Plain, new IndicatorInfo("TableView 3")); var child_6 = new ChildExampleViewController(new IndicatorInfo("View 3")); var child_7 = new TableChildExampleViewController(UITableViewStyle.Grouped, new IndicatorInfo("Table View 4")); var child_8 = new ChildExampleViewController(new IndicatorInfo("View 4")); var childViewControllers = new List <UIViewController>() { child_1, child_2, child_3, child_4, child_5, child_6, child_7, child_8 }; if (!IsReload) { return(childViewControllers); } for (var index = 0; index < childViewControllers.Count; index++) { var nElements = childViewControllers.Count - index; var n = (new Random()).Next(nElements) + index; if (n != index) { Swap(childViewControllers, index, n); } } var nItems = 1 + (new Random()).Next(8); return(childViewControllers.Take(nItems).ToList()); }
public override UIViewController[] CreateViewControllersForPagerTabStrip(PagerTabStripViewController pagerTabStripViewController) { ChildViewController controller1 = new ChildViewController("PODCASTS"); ChildViewController controller2 = new ChildViewController("VIDEOS"); ChildViewController controller3 = new ChildViewController("TRENDING"); ChildViewController controller4 = new ChildViewController("PROFILE"); return(new UIViewController[] { controller1, controller2, controller3, controller4 }); }
void updateTitle(PagerTabStripViewController pagerTabStripViewController) { titleLabel.Text = string.Format("Progressive = {0} ElasticLimit = {1}", pagerTabStripViewController.PagerBehaviour.ProgressiveIndicator.ToString(), pagerTabStripViewController.PagerBehaviour.ElasticIndicatorLimit.ToString()); if (NavigationItem.TitleView != null && NavigationItem.TitleView is UILabel) { ((UILabel)NavigationItem.TitleView).Text = titleLabel.Text; NavigationItem.TitleView.SizeToFit(); } }
public IndicatorInfo IndicatorInfoForPagerTabStrip(PagerTabStripViewController pagerTabStripController) { return(new IndicatorInfo(Title)); }
public IndicatorInfo GetIndicatorInfo(PagerTabStripViewController pagerTabStripController) { return(ItemInfo); }