1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-16 00:03:22 +00:00

Stepper table view cell. Min numbers/special to password generator.

This commit is contained in:
Kyle Spearrin
2016-07-14 19:01:34 -04:00
parent 49cb984373
commit afd22b6462
5 changed files with 86 additions and 13 deletions

View File

@@ -108,18 +108,26 @@ namespace Bit.iOS.Extension
public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
{
var cell = tableView.DequeueReusableCell(CellIdentifier);
var item = _tableItems.ElementAt(indexPath.Row);
// if there are no cells to reuse, create a new one
if(cell == null)
{
cell = new UITableViewCell(UITableViewCellStyle.Subtitle, CellIdentifier);
}
return cell;
}
public override void WillDisplay( UITableView tableView, UITableViewCell cell, NSIndexPath indexPath )
{
if(cell == null)
{
return;
}
var item = _tableItems.ElementAt( indexPath.Row );
cell.TextLabel.Text = item.Name;
cell.DetailTextLabel.Text = item.Username;
cell.DetailTextLabel.TextColor = cell.DetailTextLabel.TintColor = new UIColor(red: 0.47f, green: 0.47f, blue: 0.47f, alpha: 1.0f);
return cell;
cell.DetailTextLabel.TextColor = cell.DetailTextLabel.TintColor = new UIColor( red: 0.47f, green: 0.47f, blue: 0.47f, alpha: 1.0f );
}
public override void RowSelected(UITableView tableView, NSIndexPath indexPath)