From 47b6115ffdba98fd8b893b6a567b358c8a7a2c8c Mon Sep 17 00:00:00 2001 From: rajampetS Date: Mon, 5 Jul 2021 13:56:53 +0530 Subject: [PATCH] Generalised delegate method --- MVMCoreUI/Atomic/Atoms/Selectors/RadioBoxes.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MVMCoreUI/Atomic/Atoms/Selectors/RadioBoxes.swift b/MVMCoreUI/Atomic/Atoms/Selectors/RadioBoxes.swift index 79a3e6e0..c0f001e7 100644 --- a/MVMCoreUI/Atomic/Atoms/Selectors/RadioBoxes.swift +++ b/MVMCoreUI/Atomic/Atoms/Selectors/RadioBoxes.swift @@ -9,7 +9,7 @@ import Foundation public protocol RadioBoxSelectionDelegate: class { - func selectedRadioBox(text: String) + func selected(radioBox: RadioBoxModel) } open class RadioBoxes: View { @@ -167,7 +167,7 @@ extension RadioBoxes: UICollectionViewDelegate { _ = FormValidator.validate(delegate: delegateObject?.formHolderDelegate) cell.updateAccessibility() guard let radioBox = boxes?[indexPath.row] else { return } - radioDelegate?.selectedRadioBox(text: radioBox.text) + radioDelegate?.selected(radioBox: radioBox) } open func collectionView(_ collectionView: UICollectionView, didDeselectItemAt indexPath: IndexPath) {