Text formatting framework written for SwiftUI and based on AnyFormatKit.
- iOS 13.0+
- Swift 4.0+
- Xcode 11.0+
AnyFormatKit is available with Swift Package Manager.
Once you have your Swift package set up, than simply add AnyFormatKitSwiftUI to the dependencies value of your Package.swift
dependencies: [
.package(url: "https://github.com/luximetr/AnyFormatKitSwiftUI.git", .upToNextMajor(from: "0.5.3"))
]AnyFormatKitSwiftUI is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'AnyFormatKitSwiftUI', '~> 0.5.3'Then, run the following command:
$ pod installimport SwiftUI
import AnyFormatKitSwiftUI
struct ContentView: View {
@State var text = ""
var body: some View {
FormatTextField(
unformattedText: $text,
textPattern: "### (###) ###-##-##"
)
}
}For more details look example
FormatTextField- formatting symbol by symbolFormatSumTextField- formatting like a money formatFormatStartTextField- formatting with all textPattern as placeholder
| Features | |
|---|---|
| 🚴 | Formatting text during typing |
| #️⃣ | Set format using '#' characters like '### ##-###' |
| 😛 | Supporting emojis |
| 💲 | Formatting money amount |
| Formatting with placeholders |
luximetr, [email protected]
AnyFormatKitSwiftUI is available under the MIT license. See the LICENSE file for more info.




