void ReleaseDesignerOutlets() { if (DescriptionLabel != null) { DescriptionLabel.Dispose(); DescriptionLabel = null; } if (OwnerLabel != null) { OwnerLabel.Dispose(); OwnerLabel = null; } if (TitleLabel != null) { TitleLabel.Dispose(); TitleLabel = null; } if (RepositoryImageView != null) { RepositoryImageView.Dispose(); RepositoryImageView = null; } }
public void Set(string name, string owner, string description, string avatarUrl) { TitleLabel.Text = name; OwnerLabel.Text = owner; DescriptionLabel.Text = description; if (avatarUrl == null) { RepositoryImageView.Image = null; } else { try { RepositoryImageView.SetImage(new NSUrl(avatarUrl), Images.UnknownUser, (img, err, type, imageUrl) => { if (img == null || err != null) { return; } if (type == SDImageCacheType.None) { RepositoryImageView.Image = Images.UnknownUser; BeginInvokeOnMainThread(() => UIView.Transition(RepositoryImageView, 0.25f, UIViewAnimationOptions.TransitionCrossDissolve, () => RepositoryImageView.Image = img, null)); } }); } catch { } } }