Making container tappabble to increase actionable surface area.
This commit is contained in:
parent
6b34b8840d
commit
420a874711
@ -120,6 +120,10 @@ import UIKit
|
|||||||
if let bottomBar = bottomBar {
|
if let bottomBar = bottomBar {
|
||||||
layer.addSublayer(bottomBar)
|
layer.addSublayer(bottomBar)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let tap = UITapGestureRecognizer(target: self, action: #selector(callTextField))
|
||||||
|
addGestureRecognizer(tap)
|
||||||
|
|
||||||
updateView(MVMCoreUISplitViewController.getDetailViewWidth())
|
updateView(MVMCoreUISplitViewController.getDetailViewWidth())
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,39 +149,40 @@ import UIKit
|
|||||||
// MARK: - Methods
|
// MARK: - Methods
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
@objc public func callTextField() {
|
||||||
|
|
||||||
|
digitField.becomeFirstResponder()
|
||||||
|
}
|
||||||
|
|
||||||
@objc public override func updateView(_ size: CGFloat) {
|
@objc public override func updateView(_ size: CGFloat) {
|
||||||
super.updateView(size)
|
super.updateView(size)
|
||||||
|
|
||||||
DispatchQueue.main.async { [weak self] in
|
if !MVMCoreGetterUtility.fequal(a: Float(size), b: Float(previousSize)) {
|
||||||
guard let self = self else { return }
|
MFStyler.styleTextField(digitField)
|
||||||
|
digitField.font = MFFonts.mfFont55Rg(28)
|
||||||
|
|
||||||
if !MVMCoreGetterUtility.fequal(a: Float(size), b: Float(self.previousSize)) {
|
var width: CGFloat = 0
|
||||||
MFStyler.styleTextField(self.digitField)
|
var height: CGFloat = 0
|
||||||
self.digitField.font = MFFonts.mfFont55Rg(28)
|
|
||||||
|
|
||||||
var width: CGFloat = 0
|
let sizeObject = MFSizeObject(standardBlock: {
|
||||||
var height: CGFloat = 0
|
width = 39
|
||||||
|
height = 44
|
||||||
|
|
||||||
let sizeObject = MFSizeObject(standardBlock: {
|
}, smalliPhone: {
|
||||||
width = 39
|
width = 35
|
||||||
height = 44
|
height = 38
|
||||||
|
|
||||||
}, smalliPhone: {
|
}, standardiPadPortraitBlock: {
|
||||||
width = 35
|
width = 59
|
||||||
height = 38
|
height = 74
|
||||||
|
})
|
||||||
|
|
||||||
}, standardiPadPortraitBlock: {
|
sizeObject?.performBlockBase(onSize: size)
|
||||||
width = 59
|
widthConstraint?.constant = width
|
||||||
height = 74
|
heightConstraint?.constant = height
|
||||||
})
|
previousSize = size
|
||||||
|
|
||||||
sizeObject?.performBlockBase(onSize: size)
|
|
||||||
self.widthConstraint?.constant = width
|
|
||||||
self.heightConstraint?.constant = height
|
|
||||||
self.previousSize = size
|
|
||||||
}
|
|
||||||
|
|
||||||
self.setNeedsLayout()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setNeedsLayout()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -166,6 +166,9 @@ import UIKit
|
|||||||
textFieldTrailingConstraint = container.trailingAnchor.constraint(equalTo: textField.trailingAnchor, constant: 16)
|
textFieldTrailingConstraint = container.trailingAnchor.constraint(equalTo: textField.trailingAnchor, constant: 16)
|
||||||
textFieldTrailingConstraint?.isActive = true
|
textFieldTrailingConstraint?.isActive = true
|
||||||
|
|
||||||
|
let tap = UITapGestureRecognizer(target: self, action: #selector(startEditing))
|
||||||
|
entryFieldContainer.addGestureRecognizer(tap)
|
||||||
|
|
||||||
accessibilityElements = [titleLabel, textField, feedbackLabel]
|
accessibilityElements = [titleLabel, textField, feedbackLabel]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -271,7 +271,5 @@ import UIKit
|
|||||||
self.delegateObject = delegateObject
|
self.delegateObject = delegateObject
|
||||||
|
|
||||||
guard let dictionary = json, !dictionary.isEmpty else { return }
|
guard let dictionary = json, !dictionary.isEmpty else { return }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user