some accessibility. spacing and formatting
This commit is contained in:
parent
01f7e87981
commit
bd15836698
@ -14,7 +14,6 @@ open class Stack<T>: Container where T: (StackModelProtocol & MoleculeModelProto
|
|||||||
|
|
||||||
open var contentView: UIView = MVMCoreUICommonViewsUtility.commonView()
|
open var contentView: UIView = MVMCoreUICommonViewsUtility.commonView()
|
||||||
open var stackItems: [UIView] = []
|
open var stackItems: [UIView] = []
|
||||||
var didSetAcessibilityElements = false
|
|
||||||
|
|
||||||
open var stackModel: T? {
|
open var stackModel: T? {
|
||||||
get { return model as? T }
|
get { return model as? T }
|
||||||
@ -48,15 +47,6 @@ open class Stack<T>: Container where T: (StackModelProtocol & MoleculeModelProto
|
|||||||
addView(view, stackModel.molecules[index], totalSpacing: totalSpace, lastItem: lastItemIndex == index)
|
addView(view, stackModel.molecules[index], totalSpacing: totalSpace, lastItem: lastItemIndex == index)
|
||||||
}
|
}
|
||||||
|
|
||||||
// setAccessibilityElements()
|
|
||||||
}
|
|
||||||
|
|
||||||
open func setAccessibilityElements() {
|
|
||||||
|
|
||||||
guard !didSetAcessibilityElements,
|
|
||||||
let stackModel = stackModel
|
|
||||||
else { return }
|
|
||||||
|
|
||||||
isAccessibilityElement = false
|
isAccessibilityElement = false
|
||||||
var accessibleViews: [Any] = []
|
var accessibleViews: [Any] = []
|
||||||
|
|
||||||
@ -65,7 +55,6 @@ open class Stack<T>: Container where T: (StackModelProtocol & MoleculeModelProto
|
|||||||
}
|
}
|
||||||
|
|
||||||
accessibilityElements = accessibleViews
|
accessibilityElements = accessibleViews
|
||||||
didSetAcessibilityElements = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Removes all stack items views from the view.
|
/// Removes all stack items views from the view.
|
||||||
|
|||||||
@ -108,10 +108,6 @@ open class MoleculeListTemplate: ThreeLayerTableViewController, TemplateProtocol
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
open override func accessibilityElementCount() -> Int {
|
|
||||||
return moleculesInfo?.count ?? 0
|
|
||||||
}
|
|
||||||
|
|
||||||
open func tableView(_ tableView: UITableView, estimatedHeightForRowAt indexPath: IndexPath) -> CGFloat {
|
open func tableView(_ tableView: UITableView, estimatedHeightForRowAt indexPath: IndexPath) -> CGFloat {
|
||||||
guard let moleculeInfo = moleculesInfo?[indexPath.row],
|
guard let moleculeInfo = moleculesInfo?[indexPath.row],
|
||||||
let estimatedHeight = (moleculeInfo.class as? MoleculeViewProtocol.Type)?.estimatedHeight(with: moleculeInfo.molecule, delegateObject() as? MVMCoreUIDelegateObject)
|
let estimatedHeight = (moleculeInfo.class as? MoleculeViewProtocol.Type)?.estimatedHeight(with: moleculeInfo.molecule, delegateObject() as? MVMCoreUIDelegateObject)
|
||||||
|
|||||||
@ -126,7 +126,6 @@ import UIKit
|
|||||||
selectionStyle = .none
|
selectionStyle = .none
|
||||||
insetsLayoutMarginsFromSafeArea = false
|
insetsLayoutMarginsFromSafeArea = false
|
||||||
preservesSuperviewLayoutMargins = false
|
preservesSuperviewLayoutMargins = false
|
||||||
isAccessibilityElement = false
|
|
||||||
contentView.insetsLayoutMarginsFromSafeArea = false
|
contentView.insetsLayoutMarginsFromSafeArea = false
|
||||||
contentView.preservesSuperviewLayoutMargins = false
|
contentView.preservesSuperviewLayoutMargins = false
|
||||||
styleStandard()
|
styleStandard()
|
||||||
|
|||||||
@ -41,7 +41,7 @@ open class ThreeLayerTableViewController: ProgrammaticTableViewController {
|
|||||||
createViewForTableHeader()
|
createViewForTableHeader()
|
||||||
createViewForTableFooter()
|
createViewForTableFooter()
|
||||||
tableView?.reloadData()
|
tableView?.reloadData()
|
||||||
// accessibilityElements = [tableView as Any]
|
accessibilityElements = [tableView as Any]
|
||||||
}
|
}
|
||||||
|
|
||||||
override open func viewDidLoad() {
|
override open func viewDidLoad() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user