accessibility fix
This commit is contained in:
parent
94deaeff60
commit
7728afb122
@ -18,16 +18,16 @@
|
|||||||
public let rightLabel = Label(fontStyle: .RegularBodySmall)
|
public let rightLabel = Label(fontStyle: .RegularBodySmall)
|
||||||
private lazy var rightLabelStackItem: StackItem = {
|
private lazy var rightLabelStackItem: StackItem = {
|
||||||
return StackItem(andContain: rightLabel)
|
return StackItem(andContain: rightLabel)
|
||||||
}()
|
}()
|
||||||
public lazy var horizontalStack: Stack<StackModel> = {
|
public lazy var horizontalStack: Stack<StackModel> = {
|
||||||
return Stack<StackModel>(with: StackModel(molecules: [StackItemModel(horizontalAlignment: .fill),
|
return Stack<StackModel>(with: StackModel(molecules: [StackItemModel(horizontalAlignment: .fill),
|
||||||
StackItemModel(horizontalAlignment: .fill),
|
StackItemModel(horizontalAlignment: .fill),
|
||||||
StackItemModel(horizontalAlignment: .trailing)],
|
StackItemModel(horizontalAlignment: .trailing)],
|
||||||
axis: .horizontal, spacing: Padding.Two), stackItems: [StackItem(andContain: leftHeadline), StackItem(andContain: heart), rightLabelStackItem])
|
axis: .horizontal, spacing: Padding.Two), stackItems: [StackItem(andContain: leftHeadline), StackItem(andContain: heart), rightLabelStackItem])
|
||||||
}()
|
}()
|
||||||
public lazy var stack: Stack<StackModel> = {
|
public lazy var stack: Stack<StackModel> = {
|
||||||
return Stack<StackModel>.createStack(with: [horizontalStack, leftBody, leftSubBody], axis: .vertical, spacing: 0)
|
return Stack<StackModel>.createStack(with: [horizontalStack, leftBody, leftSubBody], axis: .vertical, spacing: 0)
|
||||||
}()
|
}()
|
||||||
public var sizeObject: MFSizeObject? = MFSizeObject(standardSize: 12, standardiPadPortraitSize: 18)
|
public var sizeObject: MFSizeObject? = MFSizeObject(standardSize: 12, standardiPadPortraitSize: 18)
|
||||||
|
|
||||||
//-------------------------------------------------------
|
//-------------------------------------------------------
|
||||||
@ -76,6 +76,15 @@
|
|||||||
return heroCenter
|
return heroCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override func didSelectCell(at index: IndexPath, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable : Any]?) {
|
||||||
|
if listItemModel?.action != nil {
|
||||||
|
super.didSelectCell(at: index, delegateObject: delegateObject, additionalData: additionalData)
|
||||||
|
} else {
|
||||||
|
heart.tapAction()
|
||||||
|
updateAccessibilityLabel()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
open override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
open override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||||
return 120
|
return 120
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user