Merge branch 'feature/delegate_object' into 'develop'

warning delegate fixes

See merge request BPHV_MIPS/mvm_core!8
This commit is contained in:
Pfeil, Scott Robert 2019-04-16 14:01:31 -04:00
commit a35a92d1b2
3 changed files with 11 additions and 3 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 {

View File

@ -39,7 +39,7 @@
}
+ (void)logWithDelegateLoadFinished:(nullable MVMCoreLoadObject *)loadObject loadedViewController:(nullable UIViewController <MVMCoreViewControllerProtocol> *)loadedViewController error:(nullable MVMCoreErrorObject *)error {
if ([[MVMCoreObject sharedInstance].loggingDelegate respondsToSelector:@selector(logWithDelegateLoadFinished:loadedViewController:error:)]) {
if ([[MVMCoreObject sharedInstance].loggingDelegate respondsToSelector:@selector(logLoadFinished:loadedViewController:error:)]) {
[[MVMCoreObject sharedInstance].loggingDelegate logLoadFinished:loadObject loadedViewController:loadedViewController error:error];
}
}