Updated all iOS references to default local account new to be device specific

This commit is contained in:
Phil Viso
2019-05-19 16:52:21 -05:00
parent 890c146c7e
commit bce45d28e4
7 changed files with 62 additions and 16 deletions

View File

@@ -6,10 +6,19 @@
// Copyright © 2019 Ranchero Software. All rights reserved.
//
import Account
import UIKit
class AddAccountViewController: UITableViewController {
@IBOutlet private weak var localAccountNameLabel: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
localAccountNameLabel.text = Account.defaultLocalAccountName
}
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
switch indexPath.row {
case 0:

View File

@@ -11,8 +11,16 @@ import Account
class AddLocalAccountViewController: UIViewController {
@IBOutlet private weak var localAccountNameLabel: UILabel!
@IBOutlet weak var nameTextField: UITextField!
override func viewDidLoad() {
super.viewDidLoad()
localAccountNameLabel.text = Account.defaultLocalAccountName
nameTextField.delegate = self
}
@IBAction func cancel(_ sender: Any) {
dismiss(animated: true)
}
@@ -24,3 +32,12 @@ class AddLocalAccountViewController: UIViewController {
}
}
extension AddLocalAccountViewController: UITextFieldDelegate {
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
textField.resignFirstResponder()
return true
}
}

View File

@@ -484,6 +484,9 @@
<outlet property="delegate" destination="b00-4A-bV6" id="FKM-rN-deu"/>
</connections>
</tableView>
<connections>
<outlet property="localAccountNameLabel" destination="116-rt-msI" id="h6M-5V-392"/>
</connections>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="kmn-Q7-rga" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
@@ -548,6 +551,7 @@
</barButtonItem>
</navigationItem>
<connections>
<outlet property="localAccountNameLabel" destination="Tdm-Ge-uc6" id="48O-IT-xXw"/>
<outlet property="nameTextField" destination="2dx-hK-hxL" id="t5V-3x-3vu"/>
</connections>
</viewController>