public void SetData(Post post) { ImageService.Instance.LoadUrl(post.BookCoverUrl + "?v=" + post.Id) .FadeAnimation(true) .LoadingPlaceholder("Splash2", ImageSource.ApplicationBundle) .Into(ImgBookCover); ImageService.Instance.LoadUrl(post.Avatar + "?v=" + post.Id) .FadeAnimation(true) .Into(ImgAvatar); LblBookTitle.Text = post.BookTitle; LblDescription.Text = post.Description; LblNickname.Text = post.Nickname; LblUsername.Text = "@" + post.Username; ImgAvatar.AddGestureRecognizer(new UITapGestureRecognizer(() => { })); }
void ReleaseDesignerOutlets() { if (ImgAvatar != null) { ImgAvatar.Dispose(); ImgAvatar = null; } if (ImgBookCover != null) { ImgBookCover.Dispose(); ImgBookCover = null; } if (LblBookTitle != null) { LblBookTitle.Dispose(); LblBookTitle = null; } if (LblDescription != null) { LblDescription.Dispose(); LblDescription = null; } if (LblNickname != null) { LblNickname.Dispose(); LblNickname = null; } if (LblUsername != null) { LblUsername.Dispose(); LblUsername = null; } }