From 028341aa41f4f99e0bfce6a2e89b9099dca9fe07 Mon Sep 17 00:00:00 2001 From: Krishna Kishore Bandaru Date: Tue, 23 Feb 2021 17:16:54 +0530 Subject: [PATCH] changed access specifier public to open for Button model and static property to class property --- MVMCoreUI/Atomic/Atoms/Buttons/ButtonModel.swift | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/MVMCoreUI/Atomic/Atoms/Buttons/ButtonModel.swift b/MVMCoreUI/Atomic/Atoms/Buttons/ButtonModel.swift index 52ade755..641d995c 100644 --- a/MVMCoreUI/Atomic/Atoms/Buttons/ButtonModel.swift +++ b/MVMCoreUI/Atomic/Atoms/Buttons/ButtonModel.swift @@ -11,12 +11,14 @@ import UIKit public typealias FacadeElements = (fill: UIColor?, text: UIColor?, border: UIColor?) -public class ButtonModel: ButtonModelProtocol, MoleculeModelProtocol, FormGroupWatcherFieldProtocol, EnableableModelProtocol { +open class ButtonModel: ButtonModelProtocol, MoleculeModelProtocol, FormGroupWatcherFieldProtocol, EnableableModelProtocol { //-------------------------------------------------- // MARK: - Properties //-------------------------------------------------- - - public static var identifier: String = "button" + //Making static property as class property so that subclasses can override getter function of the property + open class var identifier: String { + "button" + } public var backgroundColor: Color? public var accessibilityIdentifier: String? public var title: String @@ -247,7 +249,7 @@ public class ButtonModel: ButtonModelProtocol, MoleculeModelProtocol, FormGroupW } } - public func encode(to encoder: Encoder) throws { + open func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(moleculeName, forKey: .moleculeName) try container.encode(title, forKey: .title)