예제 #1
0
        protected void ConfigureCell(ProfileTableViewCell cell, ProfileTableItem tableItem)
        {
            cell.SelectionStyle = UITableViewCellSelectionStyle.None;

            if (ProfileType.ListFriends.Equals(profileType) || ProfileType.ListGroupMembers.Equals(profileType))
            {
                cell.profileImageView.Image = UIImage.FromBundle("Profile");

                if (tableItem.ProfilePicture != null)
                {
                    Utils.SetImageFromNSUrlSession(tableItem.ProfilePicture, cell.profileImageView, this, PictureType.Profile);
                }
            }
            else if (ProfileType.ListGroups.Equals(profileType))
            {
                cell.profileImageView.Image = UIImage.FromBundle("Group");

                if (tableItem.ProfilePicture != null)
                {
                    Utils.SetImageFromNSUrlSession(tableItem.ProfilePicture, cell.profileImageView, this, PictureType.Group);
                }
            }

            cell.nameLabel.Text = tableItem.Name;
        }
예제 #2
0
        public override UITableViewCell GetCell(UITableView tv)
        {
            var cell = tv.DequeueReusableCell("profile_element") as ProfileTableViewCell;

            if (cell == null)
            {
                cell = new ProfileTableViewCell();
            }

            cell.Accessory          = Accessory;
            cell.ImageView.Image    = Image;
            cell.TitleLabel.Text    = _title;
            cell.SubtitleLabel.Text = _subtitle;
            return(cell);
        }