CRBoxInputView
CRBoxInputView copied to clipboard
哪个大佬有swift使用的demo啊
哪个大佬有swift使用的demo啊 初学者只会swift 跪求
fileprivate lazy var boxInputCellProperty = CRBoxInputCellProperty()
.then{
$0.cellCursorColor = .black
$0.cellCursorWidth = 2
$0.cellCursorHeight = 27
$0.cornerRadius = 0
$0.borderWidth = 0
$0.cellFont = .SYS_BOLD_F15
$0.cellTextColor = .blue3487FB
$0.showLine = true
$0.customLineViewBlock = {
let lineView = CRLineView()
lineView.underlineColorSelected = .black
lineView.underlineColorNormal = .blueE1E5EE
lineView.underlineColorFilled = .blue3487FB
lineView.lineView.snp.makeConstraints { make in
make.height.equalTo(4)
make.left.right.bottom.equalToSuperview()
}
lineView.selectChangeBlock = { lineView, selected in
switch selected {
case true: lineView.lineView.snp.updateConstraints { make in make.height.equalTo(6) }
case false: lineView.lineView.snp.updateConstraints { make in make.height.equalTo(4) }
}
}
return lineView
}
}
fileprivate lazy var codeBox = CRBoxInputView(codeLength: 6)!
.then{
$0.keyBoardType = .asciiCapableNumberPad
$0.customCellProperty = boxInputCellProperty
$0.mainCollectionView()?.contentInset = .zero
$0.boxFlowLayout?.itemSize = CGSize(width: codeBoxItemWidth, height: codeBoxItemWidth)
$0.loadAndPrepare(withBeginEdit: true)
$0.hero.id = "verifyCode"
}