TextInputTableViewCell.swift 860 B

123456789101112131415161718192021222324252627282930
  1. //
  2. // SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
  3. // SPDX-License-Identifier: GPL-3.0-or-later
  4. //
  5. import UIKit
  6. let kTextInputCellIdentifier = "TextInputCellIdentifier"
  7. let kTextInputTableViewCellNibName = "TextInputTableViewCell"
  8. class TextInputTableViewCell: UITableViewCell {
  9. @IBOutlet weak var textField: UITextField!
  10. override func awakeFromNib() {
  11. super.awakeFromNib()
  12. // Initialization code
  13. self.textField.clearButtonMode = .whileEditing
  14. self.textField.returnKeyType = .done
  15. }
  16. override func prepareForReuse() {
  17. super.prepareForReuse()
  18. self.textField.text = ""
  19. self.textField.placeholder = nil
  20. self.textField.keyboardType = .default
  21. self.textField.autocorrectionType = .no
  22. self.textField.autocapitalizationType = .none
  23. }
  24. }