fixed display issues.
This commit is contained in:
parent
c9b41c9bc1
commit
8266b3b650
@ -150,11 +150,6 @@ import UIKit
|
||||
// MARK: - Initializers
|
||||
//--------------------------------------------------
|
||||
|
||||
required public init?(coder: NSCoder) {
|
||||
super.init(coder: coder)
|
||||
fatalError("DigitEntryField xib has not been implemented")
|
||||
}
|
||||
|
||||
public override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
setup()
|
||||
@ -179,6 +174,11 @@ import UIKit
|
||||
buildTextFieldsView(size: size ?? MVMCoreUISplitViewController.getDetailViewWidth())
|
||||
}
|
||||
|
||||
required public init?(coder: NSCoder) {
|
||||
super.init(coder: coder)
|
||||
fatalError("DigitEntryField xib has not been implemented")
|
||||
}
|
||||
|
||||
open override func setupFieldContainerContent(_ container: UIView) {
|
||||
|
||||
setupTextFieldsView(forSize: CGFloat(numberOfDigits))
|
||||
|
||||
@ -14,6 +14,16 @@ import UIKit
|
||||
// MARK: - Outlets
|
||||
//--------------------------------------------------
|
||||
|
||||
let dropDownCaretLabel: Label = {
|
||||
let label = Label()
|
||||
label.setContentHuggingPriority(UILayoutPriority(900), for: .horizontal)
|
||||
label.setContentHuggingPriority(UILayoutPriority(251), for: .vertical)
|
||||
label.setContentCompressionResistancePriority(UILayoutPriority(900), for: .horizontal)
|
||||
label.isHidden = true
|
||||
label.isUserInteractionEnabled = true
|
||||
return label
|
||||
}()
|
||||
|
||||
private var calendar: Calendar?
|
||||
|
||||
//--------------------------------------------------
|
||||
@ -28,7 +38,6 @@ import UIKit
|
||||
// MARK: - Properties
|
||||
//--------------------------------------------------
|
||||
|
||||
public var dropDownCaretLabel: UILabel?
|
||||
public var dropDownIsDisplayed = false
|
||||
|
||||
public override var isEnabled: Bool {
|
||||
@ -57,36 +66,26 @@ import UIKit
|
||||
self.init(frame: .zero)
|
||||
}
|
||||
|
||||
required public init?(coder: NSCoder) {
|
||||
super.init(coder: coder)
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
/// - parameter bothDelegates: Sets both MF/UI Text Field Delegates.
|
||||
public override init(bothDelegates: (UITextFieldDelegate & TextFieldDelegate)?) {
|
||||
super.init(frame: .zero)
|
||||
|
||||
setupView()
|
||||
|
||||
MVMCoreUICommonViewsUtility.addDismissToolbar(textField, delegate: bothDelegates)
|
||||
|
||||
setBothTextDelegates(bothDelegates)
|
||||
}
|
||||
|
||||
required public init?(coder: NSCoder) {
|
||||
super.init(coder: coder)
|
||||
fatalError("DropdownEntryField does not support xib.")
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Lifecycle
|
||||
//--------------------------------------------------
|
||||
|
||||
open override func setupFieldContainerContent(_ container: UIView) {
|
||||
|
||||
|
||||
let dropDownCaretLabel = Label()
|
||||
self.dropDownCaretLabel = dropDownCaretLabel
|
||||
dropDownCaretLabel.setContentHuggingPriority(UILayoutPriority(900), for: .horizontal)
|
||||
dropDownCaretLabel.setContentHuggingPriority(UILayoutPriority(251), for: .vertical)
|
||||
dropDownCaretLabel.setContentCompressionResistancePriority(UILayoutPriority(900), for: .horizontal)
|
||||
dropDownCaretLabel.isHidden = true
|
||||
dropDownCaretLabel.isUserInteractionEnabled = true
|
||||
let tapOnCarrot = UITapGestureRecognizer(target: self, action: #selector(startEditing))
|
||||
dropDownCaretLabel.addGestureRecognizer(tapOnCarrot)
|
||||
|
||||
@ -106,7 +105,7 @@ import UIKit
|
||||
|
||||
public func showDropDown(_ show: Bool) {
|
||||
|
||||
dropDownCaretLabel?.isHidden = !show
|
||||
dropDownCaretLabel.isHidden = !show
|
||||
dropDownCaretWidth?.isActive = !show
|
||||
setNeedsLayout()
|
||||
layoutIfNeeded()
|
||||
@ -208,7 +207,7 @@ extension DropdownEntryField {
|
||||
else { return }
|
||||
|
||||
if let _ = dictionary[KeyType] as? String {
|
||||
dropDownCaretLabel?.isHidden = false
|
||||
dropDownCaretLabel.isHidden = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -122,11 +122,6 @@ import UIKit
|
||||
self.init(frame: .zero)
|
||||
}
|
||||
|
||||
required public init?(coder: NSCoder) {
|
||||
super.init(coder: coder)
|
||||
fatalError("TextEntryField does not support xib.")
|
||||
}
|
||||
|
||||
/// - parameter bothDelegates: Sets both MF/UI Text Field Delegates.
|
||||
public init(bothDelegates: (UITextFieldDelegate & TextFieldDelegate)?) {
|
||||
super.init(frame: .zero)
|
||||
@ -135,6 +130,11 @@ import UIKit
|
||||
setBothTextDelegates(bothDelegates)
|
||||
}
|
||||
|
||||
required public init?(coder: NSCoder) {
|
||||
super.init(coder: coder)
|
||||
fatalError("TextEntryField does not support xib.")
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Lifecycle
|
||||
//--------------------------------------------------
|
||||
|
||||
Loading…
Reference in New Issue
Block a user