Пример #1
0
        void OpenRankingDetail()
        {
            this.View.LayoutIfNeeded();

            HeaderHeightConstraint.Constant                 = HeaderHeightCollapsed;
            TeamOwnerHolderHeightConstraint.Constant        = 0;
            TeamRankingGraphHolderHeightConstraint.Constant = TeamRankingGraphHolderHeight;

            var newContentOffset = new CGPoint(0, TeamCyclersTable.ContentOffset.Y - HeaderCollapseDelta);

            UIView.Animate(ExpandCollapseAnimationDuration, () => {
                TeamCyclersTable.ContentInset          = new UIEdgeInsets(HeaderHeightCollapsed + TeamRankingGraphHolderHeight, 0, 0, 0);
                TeamCyclersTable.ContentOffset         = newContentOffset;
                TeamCyclersTable.ScrollIndicatorInsets = new UIEdgeInsets(HeaderHeightCollapsed + TeamRankingGraphHolderHeight, 0, 0, 0);

                OwnerNameLabel.Alpha = 0;
                OwnerImageView.Alpha = 0;

                this.View.LayoutIfNeeded();
            },
                           () => {
                scoreView              = new ScoreView(Results);
                scoreView.Bounces      = false;
                scoreView.Frame        = new CGRect(new CGPoint(0, 0), TeamRankingGraphHolder.Frame.Size);
                scoreView.WeakDelegate = this;
                TeamRankingGraphHolder.AddSubview(scoreView);

                scoreView.Configure();
                scoreView.ShowData();
                var competition = scoreView.GetCompetitionAtCurrentOffset();
                TeamRankingGraphCurrentCompetitionNameLabel.Text = competition.Name;
            });
        }
Пример #2
0
        void ReleaseDesignerOutlets()
        {
            if (FollowButton != null)
            {
                FollowButton.Dispose();
                FollowButton = null;
            }

            if (HeaderHeightConstraint != null)
            {
                HeaderHeightConstraint.Dispose();
                HeaderHeightConstraint = null;
            }

            if (OwnerImageView != null)
            {
                OwnerImageView.Dispose();
                OwnerImageView = null;
            }

            if (OwnerNameLabel != null)
            {
                OwnerNameLabel.Dispose();
                OwnerNameLabel = null;
            }

            if (RankingButton != null)
            {
                RankingButton.Dispose();
                RankingButton = null;
            }

            if (TeamCyclersTable != null)
            {
                TeamCyclersTable.Dispose();
                TeamCyclersTable = null;
            }

            if (TeamHeaderHolder != null)
            {
                TeamHeaderHolder.Dispose();
                TeamHeaderHolder = null;
            }

            if (TeamImageView != null)
            {
                TeamImageView.Dispose();
                TeamImageView = null;
            }

            if (TeamOwnerDetailHolder != null)
            {
                TeamOwnerDetailHolder.Dispose();
                TeamOwnerDetailHolder = null;
            }

            if (TeamOwnerHolderHeightConstraint != null)
            {
                TeamOwnerHolderHeightConstraint.Dispose();
                TeamOwnerHolderHeightConstraint = null;
            }

            if (TeamRankingGraphHolder != null)
            {
                TeamRankingGraphHolder.Dispose();
                TeamRankingGraphHolder = null;
            }

            if (TeamRankingGraphCurrentCompetitionNameLabel != null)
            {
                TeamRankingGraphCurrentCompetitionNameLabel.Dispose();
                TeamRankingGraphCurrentCompetitionNameLabel = null;
            }

            if (TeamRankingGraphHolderHeightConstraint != null)
            {
                TeamRankingGraphHolderHeightConstraint.Dispose();
                TeamRankingGraphHolderHeightConstraint = null;
            }
        }