public void Update(UIView container, ShareResponseModel shareResponse, ChallengeModel challenge, ChallengeDetailBaseViewController ctrl = null)
        {
            ResponseCode = shareResponse?.ResponseCode ?? 0;
            Controller   = ctrl;

            //CGRect cell = TableView.RectForRowAtIndexPath(NSIndexPath.FromIndex(0));
            Container = container;
            (Container as UIButton).TouchUpInside += CloseAction;
            btnCloseBgBottom.TouchUpInside        += CloseAction;
            btnCloseBg.TouchUpInside += CloseAction;

            RoundImage.Image = UIImage.FromBundle("IconScoreTransactions");
            //Commit
            float  backgroundToOverlayWidthRatio = 0.9227f;     //from spec
            nfloat width = container.Frame.Width * backgroundToOverlayWidthRatio;
            //float backgroundHeightToWidthRatio = 0.9529f;       //from spec
            //nfloat height = width * backgroundHeightToWidthRatio;
            nfloat height = TableView.Frame.Y + CellHeight + 200;     //cell.Height;
            nfloat x      = (container.Frame.Width - width) / 2.0f;   //center in overlay
            nfloat y      = (container.Frame.Height - height) / 2.0f; //center in overlay

            Frame = new CGRect(x, y, width, height);

            //ChallengeImage.SetNeedsLayout();

            /*
             * TableView.Source = new FeedTableSource();
             * TableView.RowHeight = UITableView.AutomaticDimension;
             * TableView.EstimatedRowHeight = 130.0f;
             * TableView.ReloadData();
             */
            MessageText.Text = shareResponse.ResponseMessage;
            PointsText.Text  = shareResponse.ResponseCode > 0 && challenge.PointValue > 0 ? challenge.PointValue + " pts added to your account" : "";
            AddTriangularView();
        }
Exemple #2
0
        UIViewController LoadChallengeDetail(string storyboardID)
        {
            UIStoryboard board = UIStoryboard.FromName("Challenges", null);
            ChallengeDetailBaseViewController controller = (ChallengeDetailBaseViewController)board.InstantiateViewController(storyboardID);

            controller.Challenge = Challenge;
            return(controller);
        }