public void PagerTabStripViewController(PagerTabStripViewController pagerTabStripViewController, int fromIndex, int toIndex, nfloat progressPercentage, bool indexWasChanged)
 {
     if (shouldUpdateButtonBarView)
     {
         ButtonBarView.MoveFromIndex(fromIndex, toIndex: toIndex, progressPercentage: progressPercentage, pagerScroll: PagerScroll.Yes);
         if (ChangeCurrentIndexProgressive != null)
         {
             var oldCell = ButtonBarView.CellForItem(NSIndexPath.FromItemSection(new nint(CurrentIndex != fromIndex ? fromIndex : toIndex), 0)) as ButtonBarViewCell;
             var newCell = ButtonBarView.CellForItem(NSIndexPath.FromItemSection(new nint(CurrentIndex), 0)) as ButtonBarViewCell;
             ChangeCurrentIndexProgressive(oldCell, newCell, progressPercentage, indexWasChanged, true);
         }
     }
 }
 public void PagerTabStripViewController(PagerTabStripViewController pagerTabStripViewController, int fromIndex, int toIndex)
 {
     if (shouldUpdateButtonBarView)
     {
         ButtonBarView.MoveToIndex(toIndex, animated: true, swipeDirection: toIndex < fromIndex ? SwipeDirection.Right : SwipeDirection.Left, pagerScroll: PagerScroll.Yes);
         if (ChangeCurrentIndex != null)
         {
             var oldCell = ButtonBarView.CellForItem(NSIndexPath.FromItemSection(new nint(CurrentIndex != fromIndex ? fromIndex : toIndex), 0)) as ButtonBarViewCell;
             var newCell = ButtonBarView.CellForItem(NSIndexPath.FromItemSection(new nint(CurrentIndex), 0)) as ButtonBarViewCell;
             ChangeCurrentIndex(oldCell, newCell, true);
         }
     }
 }
コード例 #3
0
 public virtual UIViewController[] ViewControllersForPagerTabStrip(PagerTabStripViewController pagerTabStripViewController)
 {
     return(CreateViewControllersForPagerTabStrip(pagerTabStripViewController));
 }
コード例 #4
0
 public virtual UIViewController[] CreateViewControllersForPagerTabStrip(PagerTabStripViewController pagerTabStripViewController)
 {
     //assertionFailure("Sub-class must implement the PagerTabStripDataSource viewControllersForPagerTabStrip: method")
     return(new UIViewController[] { });
 }