build fix

This commit is contained in:
Grigory 2017-06-08 16:15:36 +03:00
parent 43b1861347
commit 36200eaeb9
6 changed files with 14 additions and 14 deletions

View File

@ -34,5 +34,5 @@ extension CellFieldJumpingProtocol {
})
.addDisposableTo(disposeBag)
}
}

View File

@ -10,5 +10,5 @@ extension CellFieldMaskProtocol {
var haveMask: Bool {
return maskFieldTextProxy != nil
}
}

View File

@ -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 {

View File

@ -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)
}

View File

@ -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

View File

@ -26,5 +26,5 @@ class CellTextFieldViewModel: CellFieldJumpingProtocol {
self.placeholder = placeholder
self.textFieldSettingsBlock = textFieldSettingsBlock
}
}