Selaa lähdekoodia

add makeNameCell factory function / make the nav controller have a big title

Jonas Reinsch 7 vuotta sitten
vanhempi
commit
6dd6774a30

+ 12 - 0
deltachat-ios/CredentialsController.swift

@@ -57,6 +57,17 @@ class TextFieldCell:UITableViewCell {
         
         return passwordCell
     }
+    
+    static func makeNameCell() -> TextFieldCell {
+        let nameCell = TextFieldCell(description: "Name", placeholder: "new contacts nickname")
+        
+        nameCell.textField.autocapitalizationType = .words
+        nameCell.textField.autocorrectionType = .no
+        nameCell.textField.textContentType = UITextContentType.givenName
+        nameCell.textField.keyboardType = .namePhonePad
+        
+        return nameCell
+    }
 }
 
 class CredentialsController: UITableViewController {
@@ -115,6 +126,7 @@ class CredentialsController: UITableViewController {
         super.viewDidLoad()
         
         title = "Account"
+        navigationController?.navigationBar.prefersLargeTitles = true
     }
     
     override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {

+ 9 - 0
deltachat-ios/NewContactController.swift

@@ -0,0 +1,9 @@
+//
+//  NewContactController.swift
+//  deltachat-ios
+//
+//  Created by Jonas Reinsch on 17.11.17.
+//  Copyright © 2017 Jonas Reinsch. All rights reserved.
+//
+
+import Foundation