This repository has been archived by the owner on Oct 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from Shnipper/feature/addNewAccounts_fix
Feature/add new accounts fix
- Loading branch information
Showing
11 changed files
with
96 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+15.6 KB
(130%)
...deproj/project.xcworkspace/xcuserdata/shnipper.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 0 additions & 72 deletions
72
CipherEverything/ViewControllers/AccountsTableViewController.swift
This file was deleted.
Oops, something went wrong.
50 changes: 50 additions & 0 deletions
50
CipherEverything/ViewControllers/AccountsViewControllers/AccountsTableViewController.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// | ||
// AccountsTableViewController.swift | ||
// CipherEverything | ||
// | ||
// Created by Владимир Киселев on 03.04.2022. | ||
// | ||
|
||
import UIKit | ||
|
||
protocol AddNewAccountViewControllerDelegate { | ||
func updateTable(with account: Account) | ||
} | ||
|
||
class AccountsTableViewController: UITableViewController { | ||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
tableView.rowHeight = 80 | ||
} | ||
|
||
override func viewWillAppear(_ animated: Bool) { | ||
super.viewWillAppear(animated) | ||
tableView.reloadData() | ||
} | ||
|
||
// MARK: - Table view data source | ||
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | ||
DataManager.shared.accounts.count | ||
} | ||
|
||
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | ||
let cell = tableView.dequeueReusableCell(withIdentifier: "passwordCell", for: indexPath) | ||
var content = cell.defaultContentConfiguration() | ||
|
||
content.text = DataManager.shared.accounts[indexPath.row].website | ||
content.image = UIImage(systemName: "key") | ||
|
||
cell.contentConfiguration = content | ||
|
||
return cell | ||
} | ||
|
||
// MARK: - Navigation | ||
override func prepare(for segue: UIStoryboardSegue, sender: Any?) { | ||
|
||
guard let editAccountVC = segue.destination as? EditAccountViewController, | ||
let indexPath = tableView.indexPathForSelectedRow else { return } | ||
editAccountVC.account = DataManager.shared.accounts[indexPath.row] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.