void ReleaseDesignerOutlets()
        {
            if (ProfileImageView != null)
            {
                ProfileImageView.Dispose();
                ProfileImageView = null;
            }

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

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

            if (MainLabel != null)
            {
                MainLabel.Dispose();
                MainLabel = null;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (ProfileImageView != null)
            {
                ProfileImageView.Dispose();
                ProfileImageView = null;
            }

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

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

            if (ImageView != null)
            {
                ImageView.Dispose();
                ImageView = null;
            }
        }
Beispiel #3
0
        public void LoadData(FeedItem item)
        {
            NameLabel.Text    = item.Author.FirstName + " " + item.Author.LastName;
            MessageLabel.Text = item.Message;
            if (item.Author?.ProfilePictureData?.Url != null)
            {
                ProfileImageView.SetImage(NSUrl.FromString(item.Author?.ProfilePictureData?.Url));
            }
            else
            {
                ProfileImageView.Image = UIImage.LoadFromData(NSData.FromArray(item.Author.ProfilePicture));
            }

            if (item.ImageData?.Url != null)
            {
                ImageView.SetImage(NSUrl.FromString(item.ImageData.Url));
                Constraint_ImageViewRatio.Constant = 0;
            }
            else if (item.Image != null)
            {
                ImageView.Image = UIImage.LoadFromData(NSData.FromArray(item.Image));
                Constraint_ImageViewRatio.Constant = 0;
            }
            else
            {
                ImageView.Image = null;
                Constraint_ImageViewRatio.Constant = ImageView.Frame.Width;
            }

            NeedsUpdateConstraints();
            SetNeedsLayout();
        }