Skip to content

Commit

Permalink
show edit field in full width
Browse files Browse the repository at this point in the history
  • Loading branch information
r10s committed Aug 22, 2024
1 parent b47a585 commit 06a6b26
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions deltachat-ios/Controller/EditContactController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class EditContactController: UITableViewController {
nameCell.textField.text = dcContact.editedName
nameCell.textField.enablesReturnKeyAutomatically = false
nameCell.textField.returnKeyType = .done
nameCell.useFullWidth()
nameCell.placeholder = String.localizedStringWithFormat(String.localized("edit_name_placeholder"), authNameOrAddr)

title = String.localized("menu_edit_name")
Expand Down
5 changes: 5 additions & 0 deletions deltachat-ios/View/TextFieldCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ class TextFieldCell: UITableViewCell {
textField.text = text
}

func useFullWidth() {
title.isHidden = true
textField.textAlignment = .left
}

override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
if previousTraitCollection?.preferredContentSizeCategory !=
traitCollection.preferredContentSizeCategory {
Expand Down

0 comments on commit 06a6b26

Please sign in to comment.