Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

哪个大佬有swift使用的demo啊 #45

Open
Vishcn opened this issue Jan 20, 2021 · 1 comment
Open

哪个大佬有swift使用的demo啊 #45

Vishcn opened this issue Jan 20, 2021 · 1 comment

Comments

@Vishcn
Copy link

Vishcn commented Jan 20, 2021

哪个大佬有swift使用的demo啊
初学者只会swift 跪求

@ShenYj
Copy link

ShenYj commented May 6, 2022

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"
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants