Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sentryco/pinview
PinCodeView for iOS and macOS
https://github.com/sentryco/pinview
Last synced: 1 day ago
JSON representation
PinCodeView for iOS and macOS
- Host: GitHub
- URL: https://github.com/sentryco/pinview
- Owner: sentryco
- License: mit
- Created: 2024-10-05T12:50:14.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-11-06T12:54:28.000Z (11 days ago)
- Last Synced: 2024-11-06T13:55:00.258Z (11 days ago)
- Language: Swift
- Size: 50.8 KB
- Stars: 5
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Tests](https://github.com/sentryco/PinView/actions/workflows/Tests.yml/badge.svg)](https://github.com/sentryco/PinView/actions/workflows/Tests.yml)
[![codebeat badge](https://codebeat.co/badges/f1161517-1999-4386-9377-ab552fdf7655)](https://codebeat.co/projects/github-com-sentryco-pinview-main)# PinView
> 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.
## Features
- **Light / dark mode support** Apperance is automatically adjusted to the OS settings.
- **Support for iOS and macOS:** Seamlessly integrate with your projects for iPhone, iPad, Mac
- **Haptic feedback:** Provide physical feedback as users type the pin.
- **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.## Example:
```swift
struct ContentView: View {
@State private var pinCode: String = ""var body: some View {
PinCodeView(count: 4) { pin in
Swift.print("On verify - pin: \(pin)")
}
}
}
```## Swift Package Manager (SPM)
```swift
.package(url: "https://github.com/sentryco/PinView", branch: "main")
```### Future improvements:
1. **Focus Management & Backspace Functionality**
- Improve focus transitions and add backspace functionality.2. **Obfuscation Feature**
- Implement PIN obfuscation to enhance security and user privacy. (Add obfuscation after iterating through pins)3. **Refactoring & Code Organization**
- Refactor code for better modularity and readability.4. **Accessibility Improvements**
- Review and improve accessibility features, including voice-over compatibility.5. **Preview & Testing Enhancements**
- Expand preview functionality to cover more scenarios for better UI testing.
- Add note about limits with Preview vs Simulator vs Device6. **Styling & Theming Consistency**
- Use constants for styling values to ensure consistent theming.7. **Documentation & Code Comments**
- Address TODOs and FIXMEs related to documentation for better clarity and collaboration.8. **Miscellaneous**
- Add note regarding textfield position changing when keyboard is shown / dismissed etc
- Rename repo to PinCodeView?
- Remove unit-tests. And add UI-tests?