build fix
This commit is contained in:
parent
43b1861347
commit
36200eaeb9
|
|
@ -34,5 +34,5 @@ extension CellFieldJumpingProtocol {
|
|||
})
|
||||
.addDisposableTo(disposeBag)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,5 +10,5 @@ extension CellFieldMaskProtocol {
|
|||
var haveMask: Bool {
|
||||
return maskFieldTextProxy != nil
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ class CellFieldsJumpingService {
|
|||
|
||||
field.shouldGoForward.asObservable()
|
||||
.subscribe(onNext: {
|
||||
if let nextActive = cellFields.nextActive(from: offset) {
|
||||
if let nextActive = cellFields.nextActive(from: offset) {
|
||||
nextActive.shouldBecomeFirstResponder.onNext()
|
||||
} else {
|
||||
self.didDone.onNext()
|
||||
|
|
@ -99,7 +99,7 @@ class CellFieldsJumpingService {
|
|||
|
||||
toolBar.shouldGoForward.asObservable()
|
||||
.subscribe(onNext: { [weak self] in
|
||||
if let nextActive = self?.cellFields.nextActive(from: index) {
|
||||
if let nextActive = self?.cellFields.nextActive(from: index) {
|
||||
nextActive.shouldBecomeFirstResponder.onNext()
|
||||
} else {
|
||||
self?.didDone.onNext()
|
||||
|
|
@ -109,7 +109,7 @@ class CellFieldsJumpingService {
|
|||
|
||||
toolBar.shouldGoBackward.asObservable()
|
||||
.subscribe(onNext: { [weak self] in
|
||||
if let previousActive = self?.cellFields.previousActive(from: index) {
|
||||
if let previousActive = self?.cellFields.previousActive(from: index) {
|
||||
previousActive.shouldBecomeFirstResponder.onNext()
|
||||
}
|
||||
})
|
||||
|
|
@ -123,7 +123,7 @@ class CellFieldsJumpingService {
|
|||
|
||||
return toolBar
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
extension Array where Element == CellFieldJumpingProtocol {
|
||||
|
|
|
|||
|
|
@ -11,19 +11,19 @@ class MaskFieldTextProxy: NSObject {
|
|||
|
||||
private(set) var field: UITextField?
|
||||
|
||||
private let maskedDelegate: PolyMaskTextFieldDelegate
|
||||
private let maskedProxy: PolyMaskTextFieldDelegate
|
||||
|
||||
init(primaryFormat: String, affineFormats: [String] = []) {
|
||||
maskedDelegate = PolyMaskTextFieldDelegate(primaryFormat: primaryFormat, affineFormats: affineFormats)
|
||||
maskedProxy = PolyMaskTextFieldDelegate(primaryFormat: primaryFormat, affineFormats: affineFormats)
|
||||
|
||||
super.init()
|
||||
|
||||
maskedDelegate.listener = self
|
||||
maskedProxy.listener = self
|
||||
}
|
||||
|
||||
func configure(with field: UITextField) {
|
||||
self.field = field
|
||||
field.delegate = maskedDelegate
|
||||
field.delegate = maskedProxy
|
||||
}
|
||||
|
||||
private func bindData() {
|
||||
|
|
@ -36,7 +36,7 @@ class MaskFieldTextProxy: NSObject {
|
|||
return
|
||||
}
|
||||
|
||||
self?.maskedDelegate.put(text: value, into: textField)
|
||||
self?.maskedProxy.put(text: value, into: textField)
|
||||
})
|
||||
.addDisposableTo(disposeBag)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,10 +70,10 @@ class ValidationItem {
|
|||
|
||||
@discardableResult
|
||||
private func validate(text: String?, isManual: Bool = false) -> Bool {
|
||||
let error = rules.filter{
|
||||
let error = rules.filter {
|
||||
return !$0.validate(text ?? "")
|
||||
}
|
||||
.map{ rule -> ValidationError in
|
||||
.map { rule -> ValidationError in
|
||||
return ValidationError(failedRule: rule, errorMessage: rule.errorMessage())
|
||||
}
|
||||
.first
|
||||
|
|
|
|||
|
|
@ -26,5 +26,5 @@ class CellTextFieldViewModel: CellFieldJumpingProtocol {
|
|||
self.placeholder = placeholder
|
||||
self.textFieldSettingsBlock = textFieldSettingsBlock
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue