fix to mismatch
This commit is contained in:
parent
1799f166ee
commit
59900d987a
@ -6,13 +6,12 @@
|
|||||||
// Copyright © 2019 Verizon Wireless. All rights reserved.
|
// Copyright © 2019 Verizon Wireless. All rights reserved.
|
||||||
//
|
//
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
@class MVMCoreLoadObject;
|
|
||||||
@class MVMCoreUIDelegateObject;
|
@class MVMCoreUIDelegateObject;
|
||||||
|
|
||||||
@protocol MoleculeListCellProtocol <NSObject>
|
@protocol MoleculeListCellProtocol <NSObject>
|
||||||
@optional
|
@optional
|
||||||
/// Can override the molecule name for the given molecule. Otherwise we assume value for key moleculeName.
|
/// Can override the molecule name for the given molecule. Otherwise we assume value for key moleculeName.
|
||||||
+ (nullable NSString *)moleculeName:(nullable NSDictionary *)molecule loadObject:(nullable MVMCoreLoadObject *)loadObject;
|
+ (nullable NSString *)moleculeName:(nullable NSDictionary *)molecule delegateObject:(nullable MVMCoreUIDelegateObject *)delegateObject;
|
||||||
|
|
||||||
/// Can set the separator according to what the moleculeList commands.
|
/// Can set the separator according to what the moleculeList commands.
|
||||||
- (void)setSeparatorWithJSON:(nullable NSDictionary *)json delegateObject:(nullable MVMCoreUIDelegateObject *)delegateObject additionalData:(nullable NSDictionary *)additionalData indexPath:(nonnull NSIndexPath *)indexPath;
|
- (void)setSeparatorWithJSON:(nullable NSDictionary *)json delegateObject:(nullable MVMCoreUIDelegateObject *)delegateObject additionalData:(nullable NSDictionary *)additionalData indexPath:(nonnull NSIndexPath *)indexPath;
|
||||||
|
|||||||
@ -116,8 +116,8 @@ open class MoleculeListTemplate: ThreeLayerTableViewController {
|
|||||||
guard let map = molecule.molecule, let moleculeName = map.optionalStringForKey(KeyMoleculeName), let moleculeClass = MVMCoreUIMoleculeMappingObject.shared()?.moleculeMapping[moleculeName] as? AnyClass else {
|
guard let map = molecule.molecule, let moleculeName = map.optionalStringForKey(KeyMoleculeName), let moleculeClass = MVMCoreUIMoleculeMappingObject.shared()?.moleculeMapping[moleculeName] as? AnyClass else {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if let moleculeClass = moleculeClass as? MoleculeListCellProtocol.Type, let moleculeName = moleculeClass.moleculeName {
|
if let moleculeClass = moleculeClass as? MoleculeListCellProtocol.Type, let moleculeNameFunc = moleculeClass.moleculeName {
|
||||||
return (moleculeName(map, loadObject), moleculeClass)
|
return (moleculeNameFunc(map, delegateObject() as? MVMCoreUIDelegateObject), moleculeClass)
|
||||||
} else {
|
} else {
|
||||||
return (moleculeName, moleculeClass)
|
return (moleculeName, moleculeClass)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user