latest changes of pr.
This commit is contained in:
parent
30bb405b3f
commit
2ec963e2b6
@ -73,7 +73,7 @@ import UIKit
|
|||||||
|
|
||||||
private weak var widthConstraint: NSLayoutConstraint?
|
private weak var widthConstraint: NSLayoutConstraint?
|
||||||
private weak var heightConstraint: NSLayoutConstraint?
|
private weak var heightConstraint: NSLayoutConstraint?
|
||||||
private weak var digitFieldHeight: NSLayoutConstraint?
|
// private weak var digitFieldHeight: NSLayoutConstraint?
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Initializers
|
// MARK: - Initializers
|
||||||
@ -108,8 +108,8 @@ import UIKit
|
|||||||
digitField.delegate = self
|
digitField.delegate = self
|
||||||
digitField.didDeleteDelegate = self
|
digitField.didDeleteDelegate = self
|
||||||
|
|
||||||
digitFieldHeight = digitField.heightAnchor.constraint(equalToConstant: 24)
|
// digitFieldHeight = digitField.heightAnchor.constraint(equalToConstant: 24)
|
||||||
digitFieldHeight?.isActive = true
|
// digitFieldHeight?.isActive = true
|
||||||
|
|
||||||
NSLayoutConstraint.activate([
|
NSLayoutConstraint.activate([
|
||||||
digitField.topAnchor.constraint(equalTo: topAnchor, constant: PaddingOne),
|
digitField.topAnchor.constraint(equalTo: topAnchor, constant: PaddingOne),
|
||||||
@ -131,7 +131,7 @@ import UIKit
|
|||||||
let tap = UITapGestureRecognizer(target: self, action: #selector(callTextField))
|
let tap = UITapGestureRecognizer(target: self, action: #selector(callTextField))
|
||||||
addGestureRecognizer(tap)
|
addGestureRecognizer(tap)
|
||||||
|
|
||||||
updateView(MVMCoreUISplitViewController.getDetailViewWidth())
|
updateView(MVMCoreUIUtility.getWidth())
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc public func textFieldDidDelete() {
|
@objc public func textFieldDidDelete() {
|
||||||
@ -188,6 +188,7 @@ import UIKit
|
|||||||
})
|
})
|
||||||
|
|
||||||
sizeObject?.performBlockBase(onSize: size)
|
sizeObject?.performBlockBase(onSize: size)
|
||||||
|
// digitFieldHeight?.constant = floor(height * 0.55)
|
||||||
widthConstraint?.constant = width
|
widthConstraint?.constant = width
|
||||||
heightConstraint?.constant = height
|
heightConstraint?.constant = height
|
||||||
digitField.font = MFFonts.mfFont55Rg(pointSize)
|
digitField.font = MFFonts.mfFont55Rg(pointSize)
|
||||||
|
|||||||
@ -224,6 +224,7 @@ import UIKit
|
|||||||
self.layoutIfNeeded()
|
self.layoutIfNeeded()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
setNeedsLayout()
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -17,8 +17,6 @@ open class ItemDropdownEntryField: BaseDropdownEntryField {
|
|||||||
open var pickerData: [String] = []
|
open var pickerData: [String] = []
|
||||||
open var pickerView: UIPickerView?
|
open var pickerView: UIPickerView?
|
||||||
|
|
||||||
open var componentsCount = 1
|
|
||||||
|
|
||||||
/// When selecting for first responder, allow initial selected value to appear in empty text field.
|
/// When selecting for first responder, allow initial selected value to appear in empty text field.
|
||||||
public var setInitialValueInTextField = true
|
public var setInitialValueInTextField = true
|
||||||
|
|
||||||
@ -98,7 +96,7 @@ open class ItemDropdownEntryField: BaseDropdownEntryField {
|
|||||||
extension ItemDropdownEntryField: UIPickerViewDelegate, UIPickerViewDataSource {
|
extension ItemDropdownEntryField: UIPickerViewDelegate, UIPickerViewDataSource {
|
||||||
|
|
||||||
@objc public func numberOfComponents(in pickerView: UIPickerView) -> Int {
|
@objc public func numberOfComponents(in pickerView: UIPickerView) -> Int {
|
||||||
return componentsCount
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc public func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
|
@objc public func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
|
||||||
|
|||||||
@ -88,7 +88,7 @@ import MVMCore
|
|||||||
|
|
||||||
@objc public func hasValidMDN() -> Bool {
|
@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 {
|
if isNationalMDN {
|
||||||
return MVMCoreUIUtility.validateMDNString(MDN)
|
return MVMCoreUIUtility.validateMDNString(MDN)
|
||||||
@ -99,7 +99,10 @@ import MVMCore
|
|||||||
|
|
||||||
@objc public override func validateTextField() -> Bool {
|
@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()
|
let isValid = hasValidMDN()
|
||||||
|
|
||||||
|
|||||||
@ -79,9 +79,7 @@ import UIKit
|
|||||||
/// The text of this TextField.
|
/// The text of this TextField.
|
||||||
open override var text: String? {
|
open override var text: String? {
|
||||||
get { return textField.text }
|
get { return textField.text }
|
||||||
set {
|
set { textField.text = newValue }
|
||||||
textField.text = newValue
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Placeholder access for the TextField.
|
/// Placeholder access for the TextField.
|
||||||
|
|||||||
@ -31,7 +31,7 @@ open class DashLine: View {
|
|||||||
|
|
||||||
required public init?(coder: NSCoder) {
|
required public init?(coder: NSCoder) {
|
||||||
super.init(coder: coder)
|
super.init(coder: coder)
|
||||||
// fatalError("DashLine xib not supported")
|
fatalError("DashLine xib not supported")
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------
|
//------------------------------------------------------
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user