internal void Update(string text, SwipePageViewConfig config, int row, int currentIndex) { this.row = row; if (this.config != config) { this.config = config; BackgroundColor = config.BackgroundColor; label.Font = config.TitleFont; label.TextColor = row == currentIndex ? config.ActiveColor : config.InactiveColor; } label.Text = text; }
internal TabsView(SwipePageViewConfig config) { this.config = config; var layout = new UICollectionViewFlowLayout(); layout.ScrollDirection = UICollectionViewScrollDirection.Horizontal; layout.SectionInset = UIEdgeInsets.Zero; collectionView = new UICollectionView(CGRect.Empty, layout); collectionView.RegisterClassForCell(typeof(TabCollectionViewCell), typeof(TabCollectionViewCell).Name); collectionView.BackgroundColor = config.BackgroundColor; collectionView.ShowsVerticalScrollIndicator = false; collectionView.ShowsHorizontalScrollIndicator = false; border.BackgroundColor = config.BorderColor; AddSubviews(collectionView, border); }
public SwipePageViewController(SwipePageViewConfig config) { this.config = config; pageViewController = new UIPageViewController(UIPageViewControllerTransitionStyle.Scroll, UIPageViewControllerNavigationOrientation.Horizontal); tabs = new TabsView(config); }