warning delegate fixes

This commit is contained in:
Pfeil, Scott Robert 2019-04-16 12:00:32 -04:00
parent 12924790f7
commit 193497132e
2 changed files with 10 additions and 2 deletions

View File

@ -74,7 +74,11 @@
- (void)setDelegate:(NSObject<MVMCoreLoadDelegateProtocol,MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol> *)delegate {
_delegate = delegate;
_delegateObject = [DelegateObject createWithDelegateForAll:delegate];
if ([delegate respondsToSelector:@selector(delegateObject)]) {
_delegateObject = [delegate performSelector:@selector(delegateObject)];
} else {
_delegateObject = [DelegateObject createWithDelegateForAll:delegate];
}
}
- (nullable instancetype)initWithPageJSON:(nullable NSDictionary *)pageJSON modulesJSON:(nullable NSDictionary *)modulesJSON requestParameters:(nullable MVMCoreRequestParameters *)requestParameters dataForPage:(nullable NSDictionary *)dataForPage delegate:(nullable NSObject<MVMCoreLoadDelegateProtocol,MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate {

View File

@ -908,7 +908,11 @@
- (void)setDelegate:(NSObject<MVMCoreLoadDelegateProtocol,MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol> *)delegate {
_delegate = delegate;
_delegateObject = [DelegateObject createWithDelegateForAll:delegate];
if ([delegate respondsToSelector:@selector(delegateObject)]) {
_delegateObject = [delegate performSelector:@selector(delegateObject)];
} else {
_delegateObject = [DelegateObject createWithDelegateForAll:delegate];
}
}
- (nullable instancetype)initWithRequestParameters:(nullable MVMCoreRequestParameters *)requestParameters dataForPage:(nullable NSDictionary *)dataForPage delegate:(nullable NSObject<MVMCoreLoadDelegateProtocol,MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate backgroundLoad:(BOOL)backgroundLoad {