pass controller instead

This commit is contained in:
Pfeil, Scott Robert 2018-10-30 16:48:05 -04:00
parent 4deb0d66fa
commit 71523fe676
4 changed files with 9 additions and 6 deletions

View File

@ -24,7 +24,7 @@
[self willChangeValueForKey:@"isVisible"]; [self willChangeValueForKey:@"isVisible"];
self.visible = YES; self.visible = YES;
[self didChangeValueForKey:@"isVisible"]; [self didChangeValueForKey:@"isVisible"];
[MVMCoreLoggingHandler logAlertForAlertObject:self.alertObject delegate:self.delegate]; [MVMCoreLoggingHandler logAlertForAlertController:self];
} }
- (void)viewDidDisappear:(BOOL)animated { - (void)viewDidDisappear:(BOOL)animated {

View File

@ -7,6 +7,7 @@
// //
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
@class MVMCoreAlertController;
@protocol MVMCoreLoggingDelegateProtocol <NSObject> @protocol MVMCoreLoggingDelegateProtocol <NSObject>
@ -25,5 +26,6 @@
- (void)logLoadFinished:(nullable MVMCoreLoadObject *)loadObject loadedViewController:(nullable UIViewController <MVMCoreViewControllerProtocol> *)loadedViewController error:(nullable MVMCoreErrorObject *)error; - (void)logLoadFinished:(nullable MVMCoreLoadObject *)loadObject loadedViewController:(nullable UIViewController <MVMCoreViewControllerProtocol> *)loadedViewController error:(nullable MVMCoreErrorObject *)error;
// Log alert // Log alert
+ (void)logAlertForAlertObject:(nullable MVMCoreAlertObject *)alertObject delegate:(_Nullable id)delegate; + (void)logAlertForAlertController:(nullable MVMCoreAlertController *)alertController;
@end @end

View File

@ -10,6 +10,7 @@
#import <MVMCore/MVMCoreErrorObject.h> #import <MVMCore/MVMCoreErrorObject.h>
#import <MVMCore/MVMCoreViewControllerProtocol.h> #import <MVMCore/MVMCoreViewControllerProtocol.h>
#import <MVMCore/MVMCoreLoadObject.h> #import <MVMCore/MVMCoreLoadObject.h>
@class MVMCoreAlertController;
#define MVMCoreLog(fmt, ...) \ #define MVMCoreLog(fmt, ...) \
[MVMCoreLoggingHandler logDebugMessageWithDelegate:[NSString stringWithFormat:(@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__]]; [MVMCoreLoggingHandler logDebugMessageWithDelegate:[NSString stringWithFormat:(@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__]];
@ -20,6 +21,6 @@
+ (void)logDebugMessageWithDelegate:(nullable NSString *)message; + (void)logDebugMessageWithDelegate:(nullable NSString *)message;
+ (void)logWithDelegateWithObject:(nullable id)object withName:(nullable NSString *)name withExtraInfo:(nullable NSDictionary *)extra; + (void)logWithDelegateWithObject:(nullable id)object withName:(nullable NSString *)name withExtraInfo:(nullable NSDictionary *)extra;
+ (void)logWithDelegateLoadFinished:(nullable MVMCoreLoadObject *)loadObject loadedViewController:(nullable UIViewController <MVMCoreViewControllerProtocol> *)loadedViewController error:(nullable MVMCoreErrorObject *)error; + (void)logWithDelegateLoadFinished:(nullable MVMCoreLoadObject *)loadObject loadedViewController:(nullable UIViewController <MVMCoreViewControllerProtocol> *)loadedViewController error:(nullable MVMCoreErrorObject *)error;
+ (void)logAlertForAlertObject:(nullable MVMCoreAlertObject *)alertObject delegate:(_Nullable id)delegate; + (void)logAlertForAlertController:(nullable MVMCoreAlertController *)alertController;
@end @end

View File

@ -35,9 +35,9 @@
} }
} }
+ (void)logAlertForAlertObject:(nullable MVMCoreAlertObject *)alertObject delegate:(_Nullable id)delegate { + (void)logAlertForAlertController:(nullable MVMCoreAlertController *)alertController {
if ([[MVMCoreObject sharedInstance].loggingDelegate respondsToSelector:@selector(logAlertForAlertObject:delegate:)]) { if ([[MVMCoreObject sharedInstance].loggingDelegate respondsToSelector:@selector(logAlertForAlertController:)]) {
[[MVMCoreObject sharedInstance].loggingDelegate logAlertForAlertObject:alertObject delegate:delegate]; [[MVMCoreObject sharedInstance].loggingDelegate logAlertForAlertController:alertController];
} }
} }