https://github.com/devliusir/safetypay
SafetyPay is a security payment password demo.
https://github.com/devliusir/safetypay
ios11 pay safety swift-4 uitextfield-styles xcode9
Last synced: 4 months ago
JSON representation
SafetyPay is a security payment password demo.
- Host: GitHub
- URL: https://github.com/devliusir/safetypay
- Owner: DevLiuSir
- License: mit
- Created: 2018-04-05T13:13:02.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-06T13:14:09.000Z (almost 8 years ago)
- Last Synced: 2025-03-12T08:15:00.753Z (10 months ago)
- Topics: ios11, pay, safety, swift-4, uitextfield-styles, xcode9
- Language: Swift
- Homepage:
- Size: 927 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
SafetyPay is a security payment password demo

[](https://developer.apple.com/swift/)





[](https://twitter.com/LiuChuan_)
---
### Safety Pay style
- **Using enumerations to define `safetyPayStyle` types**
```swift
/// 安全支付样式
///
/// - ciphertext: 密文
/// - Plaintext: 明文
enum safetyPayStyle {
/// 密文
case ciphertext
/// 明文
case plaintext
}
```
### Screencast from our Demo
|  |  |
| :------------: | :------------: |
| `style = .plaintext` | `style = .ciphertext` |
## Example:
```swift
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
/***** SafetyPayView *****/
let vi = SafetyPayView(frame: CGRect(x: (view.bounds.width - 300) / 2, y: 200, width: 300, height: 50))
vi.style = .plaintext
view.addSubview(vi)
}
}
```