From ad3c0f90b4db607c2dcf489a3f8f2b2c7686d3a3 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Mon, 15 Apr 2019 11:46:26 -0400 Subject: [PATCH] molecule view changes --- MVMCoreUI/Atoms/Views/MFLabel.m | 6 +++--- MVMCoreUI/Atoms/Views/MFView.m | 2 +- MVMCoreUI/Molecules/ButtonView.swift | 6 +++--- MVMCoreUI/Molecules/MVMCoreUIMoleculeViewProtocol.h | 3 ++- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/MVMCoreUI/Atoms/Views/MFLabel.m b/MVMCoreUI/Atoms/Views/MFLabel.m index 66b434e5..3857cd8d 100644 --- a/MVMCoreUI/Atoms/Views/MFLabel.m +++ b/MVMCoreUI/Atoms/Views/MFLabel.m @@ -170,7 +170,7 @@ } } -+ (void)setUILabel:(nullable UILabel *)label withJSON:(nullable NSDictionary *)json delegate:(nullable NSObject *)delegate additionalData:(nullable NSDictionary *)additionalData { ++ (void)setUILabel:(nullable UILabel *)label withJSON:(nullable NSDictionary *)json delegateObject:(MVMCoreUIDelegateObject *)delegateObject additionalData:(nullable NSDictionary *)additionalData { if (label) { label.text = [json string:KeyText]; [self setLabel:label withHTML:[json string:@"html"]]; @@ -232,8 +232,8 @@ } } -- (void)setWithJSON:(NSDictionary *)json delegate:(NSObject *)delegate additionalData:(NSDictionary *)additionalData { - [MFLabel setUILabel:self withJSON:json delegate:delegate additionalData:additionalData]; +- (void)setWithJSON:(NSDictionary *)json delegateObject:(MVMCoreUIDelegateObject *)delegateObject additionalData:(NSDictionary *)additionalData { + [MFLabel setUILabel:self withJSON:json delegateObject:delegateObject additionalData:additionalData]; self.originalAttributedString = self.attributedText; } diff --git a/MVMCoreUI/Atoms/Views/MFView.m b/MVMCoreUI/Atoms/Views/MFView.m index 1ab4cda1..6c0f8309 100644 --- a/MVMCoreUI/Atoms/Views/MFView.m +++ b/MVMCoreUI/Atoms/Views/MFView.m @@ -43,7 +43,7 @@ #pragma mark - MVMCoreUIMoleculeViewProtocol -- (void)setWithJSON:(NSDictionary *)json delegate:(NSObject *)delegate additionalData:(nullable NSDictionary *)additionalData { +- (void)setWithJSON:(NSDictionary *)json delegateObject:(MVMCoreUIDelegateObject *)delegateObject additionalData:(NSDictionary *)additionalData { self.json = json; } diff --git a/MVMCoreUI/Molecules/ButtonView.swift b/MVMCoreUI/Molecules/ButtonView.swift index f48044dd..5391640c 100644 --- a/MVMCoreUI/Molecules/ButtonView.swift +++ b/MVMCoreUI/Molecules/ButtonView.swift @@ -58,9 +58,9 @@ import UIKit primaryButton?.setAsMolecule() } - open override func setWithJSON(_ json: [AnyHashable : Any]?, delegate: NSObject?, additionalData: [AnyHashable : Any]?) { - super.setWithJSON(json, delegate: delegate, additionalData: additionalData) - primaryButton?.setWithJSON(json, delegate: delegate, additionalData: additionalData) + open override func setWithJSON(_ json: [AnyHashable : Any]?, delegateObject: MVMCoreUI.DelegateObject?, additionalData: [AnyHashable : Any]?) { + super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData) + primaryButton?.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData) } // MARK: - Constraining diff --git a/MVMCoreUI/Molecules/MVMCoreUIMoleculeViewProtocol.h b/MVMCoreUI/Molecules/MVMCoreUIMoleculeViewProtocol.h index 3dd8de67..19cc1e21 100644 --- a/MVMCoreUI/Molecules/MVMCoreUIMoleculeViewProtocol.h +++ b/MVMCoreUI/Molecules/MVMCoreUIMoleculeViewProtocol.h @@ -7,11 +7,12 @@ // #import +@class MVMCoreUIDelegateObject; @protocol MVMCoreUIMoleculeViewProtocol // Sets up the ui based on the json -- (void)setWithJSON:(nullable NSDictionary *)json delegate:(nullable NSObject *)delegate additionalData:(nullable NSDictionary *)additionalData; +- (void)setWithJSON:(nullable NSDictionary *)json delegateObject:(nullable MVMCoreUIDelegateObject *)delegateObject additionalData:(nullable NSDictionary *)additionalData; @optional