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 stackItems: [UIView] = []
|
||||
var didSetAcessibilityElements = false
|
||||
|
||||
open var stackModel: 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)
|
||||
}
|
||||
|
||||
// setAccessibilityElements()
|
||||
}
|
||||
|
||||
open func setAccessibilityElements() {
|
||||
|
||||
guard !didSetAcessibilityElements,
|
||||
let stackModel = stackModel
|
||||
else { return }
|
||||
|
||||
isAccessibilityElement = false
|
||||
var accessibleViews: [Any] = []
|
||||
|
||||
@ -65,7 +55,6 @@ open class Stack<T>: Container where T: (StackModelProtocol & MoleculeModelProto
|
||||
}
|
||||
|
||||
accessibilityElements = accessibleViews
|
||||
didSetAcessibilityElements = true
|
||||
}
|
||||
|
||||
/// 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 {
|
||||
guard let moleculeInfo = moleculesInfo?[indexPath.row],
|
||||
let estimatedHeight = (moleculeInfo.class as? MoleculeViewProtocol.Type)?.estimatedHeight(with: moleculeInfo.molecule, delegateObject() as? MVMCoreUIDelegateObject)
|
||||
|
||||
@ -126,7 +126,6 @@ import UIKit
|
||||
selectionStyle = .none
|
||||
insetsLayoutMarginsFromSafeArea = false
|
||||
preservesSuperviewLayoutMargins = false
|
||||
isAccessibilityElement = false
|
||||
contentView.insetsLayoutMarginsFromSafeArea = false
|
||||
contentView.preservesSuperviewLayoutMargins = false
|
||||
styleStandard()
|
||||
|
||||
@ -41,7 +41,7 @@ open class ThreeLayerTableViewController: ProgrammaticTableViewController {
|
||||
createViewForTableHeader()
|
||||
createViewForTableFooter()
|
||||
tableView?.reloadData()
|
||||
// accessibilityElements = [tableView as Any]
|
||||
accessibilityElements = [tableView as Any]
|
||||
}
|
||||
|
||||
override open func viewDidLoad() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user