changes made to resolve VO issues
This commit is contained in:
parent
30316aeaa7
commit
b2fee17d8a
@ -17,5 +17,8 @@ open class ModalMoleculeListTemplate: MoleculeListTemplate {
|
||||
closeButton = MVMCoreUICommonViewsUtility.addCloseButton(to: view, action: { _ in
|
||||
MVMCoreNavigationHandler.shared()?.removeCurrentViewController()
|
||||
}, verticalCentered: false)
|
||||
|
||||
accessibilityElements = [closeButton as Any, tableView as Any]
|
||||
UIAccessibility.post(notification: .layoutChanged, argument: closeButton)
|
||||
}
|
||||
}
|
||||
|
||||
@ -41,6 +41,7 @@ open class ThreeLayerTableViewController: ProgrammaticTableViewController {
|
||||
createViewForTableHeader()
|
||||
createViewForTableFooter()
|
||||
tableView?.reloadData()
|
||||
accessibilityElements = [tableView as Any]
|
||||
}
|
||||
|
||||
override open func viewDidLoad() {
|
||||
|
||||
@ -9,7 +9,12 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
open class ContainerHelper: NSObject {
|
||||
//--------------------------------------------------
|
||||
// MARK: - Constraints
|
||||
//--------------------------------------------------
|
||||
|
||||
var leftConstraint: NSLayoutConstraint?
|
||||
var topConstraint: NSLayoutConstraint?
|
||||
var bottomConstraint: NSLayoutConstraint?
|
||||
@ -28,17 +33,26 @@ open class ContainerHelper: NSObject {
|
||||
var bottomLowConstraint: NSLayoutConstraint?
|
||||
var rightLowConstraint: NSLayoutConstraint?
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Methods
|
||||
//--------------------------------------------------
|
||||
|
||||
open func constrainView(_ view: UIView) {
|
||||
guard let margins = view.superview?.layoutMarginsGuide else { return }
|
||||
|
||||
leftConstraint?.isActive = false
|
||||
leftConstraint = view.leftAnchor.constraint(equalTo: margins.leftAnchor)
|
||||
leftConstraint?.isActive = true
|
||||
|
||||
topConstraint?.isActive = false
|
||||
topConstraint = view.topAnchor.constraint(equalTo: margins.topAnchor)
|
||||
topConstraint?.isActive = true
|
||||
|
||||
rightConstraint?.isActive = false
|
||||
rightConstraint = margins.rightAnchor.constraint(equalTo: view.rightAnchor)
|
||||
rightConstraint?.isActive = true
|
||||
|
||||
bottomConstraint?.isActive = false
|
||||
bottomConstraint = margins.bottomAnchor.constraint(equalTo: view.bottomAnchor)
|
||||
bottomConstraint?.isActive = true
|
||||
|
||||
@ -50,23 +64,25 @@ open class ContainerHelper: NSObject {
|
||||
alignCenterTopConstraint = view.topAnchor.constraint(greaterThanOrEqualTo: margins.topAnchor)
|
||||
alignCenterBottomConstraint = margins.bottomAnchor.constraint(greaterThanOrEqualTo: view.bottomAnchor)
|
||||
|
||||
leftLowConstraint?.isActive = false
|
||||
leftLowConstraint = view.leftAnchor.constraint(equalTo: margins.leftAnchor)
|
||||
leftLowConstraint?.priority = UILayoutPriority(rawValue: 200)
|
||||
leftLowConstraint?.isActive = true
|
||||
|
||||
topLowConstraint?.isActive = false
|
||||
topLowConstraint = view.topAnchor.constraint(equalTo: margins.topAnchor)
|
||||
topLowConstraint?.priority = UILayoutPriority(rawValue: 200)
|
||||
topLowConstraint?.isActive = true
|
||||
|
||||
rightLowConstraint?.isActive = false
|
||||
rightLowConstraint = margins.rightAnchor.constraint(equalTo: view.rightAnchor)
|
||||
rightLowConstraint?.priority = UILayoutPriority(rawValue: 200)
|
||||
rightLowConstraint?.isActive = true
|
||||
|
||||
bottomLowConstraint?.isActive = false
|
||||
bottomLowConstraint = margins.bottomAnchor.constraint(equalTo: view.bottomAnchor)
|
||||
bottomLowConstraint?.priority = UILayoutPriority(rawValue: 200)
|
||||
bottomLowConstraint?.isActive = true
|
||||
|
||||
setAccessibility(view)
|
||||
}
|
||||
|
||||
open func setAccessibility(_ view: UIView) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user