Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Small Dark mode change related with textfield placeholder - related w…
Browse files Browse the repository at this point in the history
…ith Issue #2644
  • Loading branch information
soner-yuksel committed Nov 11, 2020
1 parent 613103e commit 1ab1bb3
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Client/Extensions/UIAlertControllerExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,17 @@ class UserTextInputAlert {
private func textFieldConfig(text: String?, placeholder: String?, keyboardType: UIKeyboardType?, forcedInput: Bool)
-> (UITextField) -> Void {
return { textField in
textField.placeholder = placeholder
if #available(iOS 13.0, *) {
textField.attributedPlaceholder = NSAttributedString(
string: placeholder ?? "",
attributes: [.foregroundColor: UIColor.placeholderText])
} else {
textField.placeholder = placeholder
}

textField.keyboardAppearance = .default

textField.isSecureTextEntry = false
textField.keyboardAppearance = .dark
textField.autocapitalizationType = keyboardType == .URL ? .none : .words
textField.autocorrectionType = keyboardType == .URL ? .no : .default
textField.returnKeyType = .done
Expand Down

0 comments on commit 1ab1bb3

Please sign in to comment.