public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
        {
            var user = trendingBeers[indexPath.Row];
            var cell = tableView.DequeueReusableCell(DiscoverUserCellIndeitifier) as DiscoverUsersTableViewCell;

            if (cell == null)
            {
                cell = new DiscoverUsersTableViewCell(new NSString(DiscoverUserCellIndeitifier));
            }
            cell.Name = $"{user.FirstName} {user.LastName}";
            cell.Location = user.Location;
            if (user.ProfilePictureUri != null)
            {
                cell.Image.SetImage(new NSUrl(user.ProfilePictureUri), UIImage.FromBundle("BeerDrinkin.png"));
            }
            else
            {
                cell.Image.Image = UIImage.FromBundle("BeerDrinkin.png");
            }
            return cell;
        }
Exemple #2
0
        public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
        {
            var user = trendingBeers[indexPath.Row];
            var cell = tableView.DequeueReusableCell(DiscoverUserCellIndeitifier) as DiscoverUsersTableViewCell;

            if (cell == null)
            {
                cell = new DiscoverUsersTableViewCell(new NSString(DiscoverUserCellIndeitifier));
            }
            cell.Name     = $"{user.FirstName} {user.LastName}";
            cell.Location = user.Location;
            if (user.ProfilePictureUri != null)
            {
                cell.Image.SetImage(new NSUrl(user.ProfilePictureUri), UIImage.FromBundle("BeerDrinkin.png"));
            }
            else
            {
                cell.Image.Image = UIImage.FromBundle("BeerDrinkin.png");
            }
            return(cell);
        }