Beispiel #1
0
            /// <summary>
            /// GetCover is just like GetCell on a UITableView DataSource.
            /// </summary>
            public override TKCoverflowCoverView GetCover(TKCoverflowView coverflowView, int index)
            {
                //---- try to dequeue a reusable cover
                TKCoverflowCoverView view = coverflowView.DequeueReusableCoverView();

                //---- if we didn't get one, create a new one
                if (view == null)
                {
                    view          = new TKCoverflowCoverView(new RectangleF(0, 0, 244, 244));
                    view.Baseline = 224;
                }

                //---- set the image
                view.Image = this._coverImages[index];

                //---- return the cover view
                return(view);
            }
Beispiel #2
0
            public override TKCoverflowCoverView CoverflowViewcoverAtIndex(TKCoverflowView coverflowView, int index)
            {
                TKCoverflowCoverView cover = null;

                try{
                    cover = coverflowView.DequeueReusableCoverView();
                }catch {
                }

                if (cover == null)
                {
                    bool isPhone = UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone;
                    var  frame   = isPhone ? new RectangleF(0, 0, 224, 300) : new RectangleF(0, 0, 300, 600);

                    cover          = new TKCoverflowCoverView(frame);
                    cover.Baseline = 224;
                }

                var coverIndex = index % _viewController.Covers.Length;

                cover.Image = _viewController.Covers[coverIndex];
                return(cover);
            }
            public override TKCoverflowCoverView CoverflowViewcoverAtIndex(TKCoverflowView coverflowView, int index)
            {
                TKCoverflowCoverView cover = null;
                try{
                    cover = coverflowView.DequeueReusableCoverView();
                }catch{
                }

                if(cover == null) {
                    bool isPhone = UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone;
                    var frame = isPhone ? new RectangleF(0, 0, 224, 300) : new RectangleF(0, 0, 300, 600);

                    cover = new TKCoverflowCoverView(frame);
                    cover.Baseline = 224;
                }

                var coverIndex = index % _viewController.Covers.Length;
                cover.Image = _viewController.Covers[coverIndex];
                return cover;
            }