A sleek PinCodeView for iOS and macOS
PinView is a custom SwiftUI view designed to simplify the input of PIN codes in iOS and macOS apps. It's highly customizable to fit the look and feel of your application.
- 🌗 Light / dark mode support: Appearance is automatically adjusted to the OS settings.
- 🔢 Supports custom pin length: Set the length of the pin code to your needs.
- 🔄 Automatic textfield focus change: Automatically focuses the next textfield when the current one is filled.
struct ContentView: View {
@State private var pinCode: String = ""
var body: some View {
PinCodeView(count: 4) { pin in
Swift.print("On verify - pin: \(pin)")
}
}
}
.package(url: "https://github.com/sentryco/PinView", branch: "main")
- Add top-level styling options through ViewBuilder + Style param drilling or environment variable
-
Focus Management & Backspace Functionality
- Improve focus transitions and add backspace functionality.
-
Obfuscation Feature
- Implement PIN obfuscation to enhance security and user privacy. (Add obfuscation after iterating through pins)
-
Refactoring & Code Organization
- Refactor code for better modularity and readability.
-
Accessibility Improvements
- Review and improve accessibility features, including voice-over compatibility.
-
Preview & Testing Enhancements
- Expand preview functionality to cover more scenarios for better UI testing.
- Add note about limits with Preview vs Simulator vs Device
-
Styling & Theming Consistency
- Use constants for styling values to ensure consistent theming.
-
Documentation & Code Comments
- Address TODOs and FIXMEs related to documentation for better clarity and collaboration.
-
Miscellaneous
- Add note regarding textfield position changing when keyboard is shown / dismissed etc
- Rename repo to PinCodeView?
- Remove unit-tests. And add UI-tests?