Пример #1
0
 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;
 }
Пример #2
0
        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);
        }
Пример #3
0
 public SwipePageViewController(SwipePageViewConfig config)
 {
     this.config        = config;
     pageViewController = new UIPageViewController(UIPageViewControllerTransitionStyle.Scroll, UIPageViewControllerNavigationOrientation.Horizontal);
     tabs = new TabsView(config);
 }