Esempio n. 1
0
        public override nfloat GetHeightForRow(UITableView tableView, NSIndexPath indexPath)
        {
            if (_usedForHeight == null)
            {
                _usedForHeight = NotificationViewCell.Create();
            }

            var item = ItemAt(indexPath) as NotificationItemViewModel;

            if (item == null)
            {
                return(base.GetHeightForRow(tableView, indexPath));
            }

            _usedForHeight.ViewModel = item;
            return(_usedForHeight.GetHeight(tableView.Bounds.Size));
        }
        public override float GetHeightForRow(UITableView tableView, NSIndexPath indexPath)
        {
            if (_usedForHeight == null)
            {
                _usedForHeight = (NotificationViewCell)tableView.DequeueReusableCell(NotificationViewCell.Key);
            }

            var item = ItemAt(indexPath) as NotificationModel;

            if (item == null)
            {
                return(base.GetHeightForRow(tableView, indexPath));
            }

            _usedForHeight.ViewModel = item;
            return(_usedForHeight.GetHeight(tableView.Bounds.Size));
        }