예제 #1
0
        public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
        {
            var         cell = tableView.DequeueReusableCell(CellIdentifier) as citiesTableViewCell;
            CitiesModel pm   = TableItems[indexPath.Row];

            if (cell == null)
            {
                cell = new citiesTableViewCell(new NSString("tableviewcell"));
            }
            cell.UpdateCell(pm.namear, pm.name, pm.image);
            return(cell);
        }
예제 #2
0
        public async Task <CitiesModel> GetNewsById(int id)
        {
            CitiesModel gn = (await firebase.Child("cities").Child("note").OnceAsync <CitiesModel>())
                             .Where(c => c.Object.id == id).Select(item => new CitiesModel
            {
                id = item.Object.id,

                image = item.Object.image
            }).FirstOrDefault();

            return(gn);
        }