forked from zelo72/mastodon-ios
fix: force LTR for some text fields. #318
This commit is contained in:
parent
57f4dd9cd6
commit
ad524b0172
|
@ -87,6 +87,8 @@ extension MastodonRegisterTextFieldTableViewCell {
|
||||||
textField.autocapitalizationType = .none
|
textField.autocapitalizationType = .none
|
||||||
textField.attributedPlaceholder = nil
|
textField.attributedPlaceholder = nil
|
||||||
textField.isSecureTextEntry = false
|
textField.isSecureTextEntry = false
|
||||||
|
textField.textAlignment = .natural
|
||||||
|
textField.semanticContentAttribute = .unspecified
|
||||||
|
|
||||||
let paddingRect = CGRect(x: 0, y: 0, width: 16, height: 10)
|
let paddingRect = CGRect(x: 0, y: 0, width: 16, height: 10)
|
||||||
textField.leftView = UIView(frame: paddingRect)
|
textField.leftView = UIView(frame: paddingRect)
|
||||||
|
|
|
@ -55,6 +55,8 @@ extension MastodonRegisterViewModel {
|
||||||
cell.textField.keyboardType = .alphabet
|
cell.textField.keyboardType = .alphabet
|
||||||
cell.textField.autocorrectionType = .no
|
cell.textField.autocorrectionType = .no
|
||||||
cell.textField.text = self.username
|
cell.textField.text = self.username
|
||||||
|
cell.textField.textAlignment = .left
|
||||||
|
cell.textField.semanticContentAttribute = .forceLeftToRight
|
||||||
NotificationCenter.default.publisher(for: UITextField.textDidChangeNotification, object: cell.textField)
|
NotificationCenter.default.publisher(for: UITextField.textDidChangeNotification, object: cell.textField)
|
||||||
.receive(on: DispatchQueue.main)
|
.receive(on: DispatchQueue.main)
|
||||||
.compactMap { notification in
|
.compactMap { notification in
|
||||||
|
@ -94,6 +96,8 @@ extension MastodonRegisterViewModel {
|
||||||
cell.textField.autocorrectionType = .no
|
cell.textField.autocorrectionType = .no
|
||||||
cell.textField.isSecureTextEntry = true
|
cell.textField.isSecureTextEntry = true
|
||||||
cell.textField.text = self.password
|
cell.textField.text = self.password
|
||||||
|
cell.textField.textAlignment = .left
|
||||||
|
cell.textField.semanticContentAttribute = .forceLeftToRight
|
||||||
NotificationCenter.default.publisher(for: UITextField.textDidChangeNotification, object: cell.textField)
|
NotificationCenter.default.publisher(for: UITextField.textDidChangeNotification, object: cell.textField)
|
||||||
.receive(on: DispatchQueue.main)
|
.receive(on: DispatchQueue.main)
|
||||||
.compactMap { notification in
|
.compactMap { notification in
|
||||||
|
|
Loading…
Reference in New Issue