Beispiel #1
0
        private PageView CreatePageView()
        {
            var page = PageView.PageOnView(this, ItemsCounts, -pageViewBottomConstant,
                                           pageViewRadius, pageViewSelectedRadius, _dataSource.OnboardingPageItemColor(0));

            page.Configuration += (PageViewItem item, int index) =>
            {
                item.ImageView.Image = this.itemsInfo[index].PageIcon;
            };
            return(page);
        }
        public static PageView PageOnView(UIView view,
                                          int itemsCount,
                                          float bottomConstant,
                                          float radius,
                                          float selectedRadius,
                                          UIColor itemcolor)
        {
            var pageView = new PageView(CGRect.Empty, itemsCount, radius, selectedRadius, itemcolor);

            pageView.TranslatesAutoresizingMaskIntoConstraints = false;
            pageView.Alpha = 0.4f;
            view.AddSubview(pageView);

            var attrs = new(NSLayoutAttribute, int)[] { (NSLayoutAttribute.Left, 0), (NSLayoutAttribute.Right, 0), (NSLayoutAttribute.Bottom, (int)bottomConstant) };
Beispiel #3
0
        private void Initialize()
        {
            if (_dataSource != null)
            {
                ItemsCounts            = _dataSource.OnboardingItemsCount();
                pageViewRadius         = _dataSource.OnboardingPageItemRadius();
                pageViewSelectedRadius = _dataSource.OnboardingPageItemSelectedRadius();
            }

            itemsInfo = CreateItemsInfo();
            this.TranslatesAutoresizingMaskIntoConstraints = false;
            fillAnimationView = FillAnimationView.AnimationViewOnView(this, GetItemColor(CurrentIndex));
            contentView       = OnboardingContentView.ContentViewOnView(this,
                                                                        this,
                                                                        ItemsCounts,
                                                                        pageViewBottomConstant * -1 - pageViewSelectedRadius);

            pageView       = CreatePageView();
            gestureControl = new GestureControl(this, this);

            var tapGesture = new UITapGestureRecognizer(HandleAction);

            this.AddGestureRecognizer(tapGesture);
        }