mirror of
https://github.com/bitwarden/mobile
synced 2025-12-16 16:23:29 +00:00
Setup picker tableview cell to mimic xamarin forms picker
This commit is contained in:
@@ -33,6 +33,7 @@ namespace Bit.iOS.Extension
|
||||
public UITableViewCell GeneratePasswordCell { get; set; } = new UITableViewCell(UITableViewCellStyle.Subtitle, "GeneratePasswordCell");
|
||||
public SwitchTableViewCell FavoriteCell { get; set; } = new SwitchTableViewCell("Favorite");
|
||||
public FormEntryTableViewCell NotesCell { get; set; } = new FormEntryTableViewCell(useTextView: true, height: 90);
|
||||
public PickerTableViewCell FolderCell { get; set; } = new PickerTableViewCell(AppResources.Folder);
|
||||
|
||||
public override void ViewWillAppear(bool animated)
|
||||
{
|
||||
@@ -87,6 +88,9 @@ namespace Bit.iOS.Extension
|
||||
GeneratePasswordCell.TextLabel.Text = "Generate Password";
|
||||
GeneratePasswordCell.Accessory = UITableViewCellAccessory.DisclosureIndicator;
|
||||
|
||||
FolderCell.Items = new List<string> { "Folder 1", "Folder 2" };
|
||||
FolderCell.SelectedIndex = 1;
|
||||
|
||||
TableView.RowHeight = UITableView.AutomaticDimension;
|
||||
TableView.EstimatedRowHeight = 70;
|
||||
TableView.Source = new TableSource(this);
|
||||
@@ -195,7 +199,11 @@ namespace Bit.iOS.Extension
|
||||
}
|
||||
else if(indexPath.Section == 1)
|
||||
{
|
||||
if(indexPath.Row == 1)
|
||||
if(indexPath.Row == 0)
|
||||
{
|
||||
return _controller.FolderCell;
|
||||
}
|
||||
else if(indexPath.Row == 1)
|
||||
{
|
||||
return _controller.FavoriteCell;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user