Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions app/dime/Views/CategoryView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1789,10 +1789,6 @@ struct SuggestedCategoriesView: View {
}

class UIEmojiTextField: UITextField {
override var textInputMode: UITextInputMode? {
.activeInputModes.first(where: { $0.primaryLanguage == "emoji" })
}

override func caretRect(for _: UITextPosition) -> CGRect {
return CGRect.zero
}
Expand All @@ -1812,6 +1808,7 @@ struct EmojiTextField: UIViewRepresentable {
emojiTextField.textAlignment = .center
emojiTextField.endFloatingCursor()
emojiTextField.becomeFirstResponder()
emojiTextField.keyboardType = .emoji ?? .default
return emojiTextField
}

Expand All @@ -1838,6 +1835,10 @@ struct EmojiTextField: UIViewRepresentable {
}
}

extension UIKeyboardType {
static let emoji = UIKeyboardType(rawValue: 124)
}

struct NormalTextField: UIViewRepresentable {
@Binding var text: String
var placeholder: String = ""
Expand Down