rollback some behavior
This commit is contained in:
parent
fa99ba6b42
commit
5398008a0d
@ -26,8 +26,6 @@
|
||||
return accordionButton
|
||||
}()
|
||||
|
||||
var delegateObject: MVMCoreUIDelegateObject?
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Setup
|
||||
//--------------------------------------------------
|
||||
@ -36,27 +34,11 @@
|
||||
customAccessoryView = true
|
||||
super.setupView()
|
||||
accessoryView = accordionButton
|
||||
|
||||
accordionButton.addActionBlock(event: .touchUpInside) { _ in
|
||||
guard let model = self.accordionListItemModel else { return }
|
||||
|
||||
if let indexPath = self.delegateObject?.moleculeDelegate?.getIndexPath(for: model) {
|
||||
self.toggleAccordion(at: indexPath, delegateObject: self.delegateObject)
|
||||
}
|
||||
}
|
||||
accessoryView?.isUserInteractionEnabled = false
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Methods
|
||||
//--------------------------------------------------
|
||||
|
||||
override public func didSelectCell(at index: IndexPath, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
|
||||
|
||||
toggleAccordion(at: index, delegateObject: delegateObject)
|
||||
}
|
||||
|
||||
func toggleAccordion(at index: IndexPath, delegateObject: MVMCoreUIDelegateObject?) {
|
||||
|
||||
accordionButton.isSelected.toggle()
|
||||
accordionButton.setTitle(accordionButton.isSelected ? "-" : "+", for: .normal)
|
||||
|
||||
@ -74,9 +56,4 @@
|
||||
bottomSeparatorView?.isHidden = accordionButton.isSelected
|
||||
}
|
||||
}
|
||||
|
||||
public override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
super.set(with: model, delegateObject, additionalData)
|
||||
self.delegateObject = delegateObject
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user