some accessibility. spacing and formatting

This commit is contained in:
Kevin G Christiano 2020-09-11 15:20:12 -04:00
parent 01f7e87981
commit bd15836698
4 changed files with 1 additions and 17 deletions

View File

@ -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.

View File

@ -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)

View File

@ -126,7 +126,6 @@ import UIKit
selectionStyle = .none
insetsLayoutMarginsFromSafeArea = false
preservesSuperviewLayoutMargins = false
isAccessibilityElement = false
contentView.insetsLayoutMarginsFromSafeArea = false
contentView.preservesSuperviewLayoutMargins = false
styleStandard()

View File

@ -41,7 +41,7 @@ open class ThreeLayerTableViewController: ProgrammaticTableViewController {
createViewForTableHeader()
createViewForTableFooter()
tableView?.reloadData()
// accessibilityElements = [tableView as Any]
accessibilityElements = [tableView as Any]
}
override open func viewDidLoad() {