Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 1.01 KB

README.md

File metadata and controls

37 lines (29 loc) · 1.01 KB

SPayPassWordView 支付密码输入框

使用 可视化&代码

可视化

添加 SPayPassWordView.swift到项目

在Xib/storyboard中添加一个 View
设置 View的class为 SPayPassWordView
设置相关属性

代码

	let payPassWordView = SPayPassWordView(frame: CGRect(x: 0, y: 0, width: 300, height: 40))
	payPassWordView.lenght = 6
	payPassWordView.borderColor = .blue
	payPassWordView.borderRadius = 10
	payPassWordView.starColor   = .cyan
	payPassWordView.delegate = self

代理

	extension ViewController: SPayPassWordViewDelegate{

	    func entryComplete(password: String) {
	        label.text = "password: \(password)"
	    }

	}

demo