latest changes of pr.

This commit is contained in:
Kevin G Christiano 2020-01-07 16:08:53 -05:00
parent 30bb405b3f
commit 2ec963e2b6
6 changed files with 14 additions and 13 deletions

View File

@ -73,7 +73,7 @@ import UIKit
private weak var widthConstraint: NSLayoutConstraint?
private weak var heightConstraint: NSLayoutConstraint?
private weak var digitFieldHeight: NSLayoutConstraint?
// private weak var digitFieldHeight: NSLayoutConstraint?
//--------------------------------------------------
// MARK: - Initializers
@ -108,8 +108,8 @@ import UIKit
digitField.delegate = self
digitField.didDeleteDelegate = self
digitFieldHeight = digitField.heightAnchor.constraint(equalToConstant: 24)
digitFieldHeight?.isActive = true
// digitFieldHeight = digitField.heightAnchor.constraint(equalToConstant: 24)
// digitFieldHeight?.isActive = true
NSLayoutConstraint.activate([
digitField.topAnchor.constraint(equalTo: topAnchor, constant: PaddingOne),
@ -131,7 +131,7 @@ import UIKit
let tap = UITapGestureRecognizer(target: self, action: #selector(callTextField))
addGestureRecognizer(tap)
updateView(MVMCoreUISplitViewController.getDetailViewWidth())
updateView(MVMCoreUIUtility.getWidth())
}
@objc public func textFieldDidDelete() {
@ -188,6 +188,7 @@ import UIKit
})
sizeObject?.performBlockBase(onSize: size)
// digitFieldHeight?.constant = floor(height * 0.55)
widthConstraint?.constant = width
heightConstraint?.constant = height
digitField.font = MFFonts.mfFont55Rg(pointSize)

View File

@ -224,6 +224,7 @@ import UIKit
self.layoutIfNeeded()
}
}
setNeedsLayout()
}
//--------------------------------------------------

View File

@ -17,8 +17,6 @@ open class ItemDropdownEntryField: BaseDropdownEntryField {
open var pickerData: [String] = []
open var pickerView: UIPickerView?
open var componentsCount = 1
/// When selecting for first responder, allow initial selected value to appear in empty text field.
public var setInitialValueInTextField = true
@ -98,7 +96,7 @@ open class ItemDropdownEntryField: BaseDropdownEntryField {
extension ItemDropdownEntryField: UIPickerViewDelegate, UIPickerViewDataSource {
@objc public func numberOfComponents(in pickerView: UIPickerView) -> Int {
return componentsCount
return 1
}
@objc public func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {

View File

@ -88,7 +88,7 @@ import MVMCore
@objc public func hasValidMDN() -> Bool {
guard let MDN = mdn, !MDN.isEmpty else { return true }
guard let MDN = mdn, MDN.isEmpty else { return false }
if isNationalMDN {
return MVMCoreUIUtility.validateMDNString(MDN)
@ -99,7 +99,10 @@ import MVMCore
@objc public override func validateTextField() -> Bool {
guard !shouldValidateMDN else { return true }
guard !shouldValidateMDN, let MDN = mdn, !MDN.isEmpty else {
isValid = true
return true
}
let isValid = hasValidMDN()

View File

@ -79,9 +79,7 @@ import UIKit
/// The text of this TextField.
open override var text: String? {
get { return textField.text }
set {
textField.text = newValue
}
set { textField.text = newValue }
}
/// Placeholder access for the TextField.

View File

@ -31,7 +31,7 @@ open class DashLine: View {
required public init?(coder: NSCoder) {
super.init(coder: coder)
// fatalError("DashLine xib not supported")
fatalError("DashLine xib not supported")
}
//------------------------------------------------------