This commit is contained in:
Chris Yang 2018-10-30 13:59:30 -04:00
parent beb59b5a92
commit c7e3364399
5 changed files with 9 additions and 9 deletions

View File

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

View File

@ -73,11 +73,11 @@
} }
- (nonnull UIAlertController *)showAlertWithAlertObject:(nullable MVMCoreAlertObject *)alertObject title:(nullable NSString *)title message:(nullable NSString *)message actions:(nullable NSArray<UIAlertAction *>*)actions isGreedy:(BOOL)isGreedy { - (nonnull UIAlertController *)showAlertWithAlertObject:(nullable MVMCoreAlertObject *)alertObject title:(nullable NSString *)title message:(nullable NSString *)message actions:(nullable NSArray<UIAlertAction *>*)actions isGreedy:(BOOL)isGreedy {
return [self showAlertWithTitle:title message:message actions:actions isGreedy:isGreedy alertDelegate:nil]; return [self showAlertWithAlertObject:alertObject title:title message:message actions:actions isGreedy:isGreedy alertDelegate:nil];
} }
- (nonnull UIAlertController *)showAlertWithAlertObject:(nullable MVMCoreAlertObject *)alertObject title:(nullable NSString *)title message:(nullable NSString *)message actions:(nullable NSArray<UIAlertAction *>*)actions isGreedy:(BOOL)isGreedy alertDelegate:(nullable NSObject <MVMCoreAlertDelegateProtocol>*)alertDelegate { - (nonnull UIAlertController *)showAlertWithAlertObject:(nullable MVMCoreAlertObject *)alertObject title:(nullable NSString *)title message:(nullable NSString *)message actions:(nullable NSArray<UIAlertAction *>*)actions isGreedy:(BOOL)isGreedy alertDelegate:(nullable NSObject <MVMCoreAlertDelegateProtocol>*)alertDelegate {
return [self showAlertWithTitle:title message:message actions:actions alertStyle:UIAlertControllerStyleAlert isGreedy:isGreedy alertDelegate:alertDelegate]; return [self showAlertWithAlertObject:alertObject title:title message:message actions:actions alertStyle:UIAlertControllerStyleAlert isGreedy:isGreedy alertDelegate:alertDelegate];
} }
- (nonnull UIAlertController *)showAlertWithAlertObject:(nullable MVMCoreAlertObject *)alertObject title:(nullable NSString *)title message:(nullable NSString *)message actions:(nullable NSArray<UIAlertAction *>*)actions alertStyle:(UIAlertControllerStyle)alertStyle isGreedy:(BOOL)isGreedy alertDelegate:(nullable NSObject <MVMCoreAlertDelegateProtocol>*)alertDelegate { - (nonnull UIAlertController *)showAlertWithAlertObject:(nullable MVMCoreAlertObject *)alertObject title:(nullable NSString *)title message:(nullable NSString *)message actions:(nullable NSArray<UIAlertAction *>*)actions alertStyle:(UIAlertControllerStyle)alertStyle isGreedy:(BOOL)isGreedy alertDelegate:(nullable NSObject <MVMCoreAlertDelegateProtocol>*)alertDelegate {
@ -105,7 +105,7 @@
} }
- (nonnull UIAlertController *)showAlertWithAlertObject:(nonnull MVMCoreAlertObject *)alertObject { - (nonnull UIAlertController *)showAlertWithAlertObject:(nonnull MVMCoreAlertObject *)alertObject {
return [self showAlertWithAlertObject:alertObject title:alertObject.title message:alertObject.message pageType:alertObject.pageType actions:alertObject.actions alertStyle:alertObject.alertStyle isGreedy:alertObject.isGreedy alertDelegate:alertObject.alertDelegate]; return [self showAlertWithAlertObject:alertObject title:alertObject.title message:alertObject.message actions:alertObject.actions alertStyle:alertObject.alertStyle isGreedy:alertObject.isGreedy alertDelegate:alertObject.alertDelegate];
} }
- (void)removeAllAlertViews { - (void)removeAllAlertViews {

View File

@ -25,5 +25,5 @@
- (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)logAlertForAlertPageType:(nullable NSString *)pageType delegate:(nullable id)delegate; + (void)logAlertForAlertObject:(nullable MVMCoreAlertObject *)alertObject delegate:(_Nullable id)delegate;
@end @end

View File

@ -20,6 +20,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)logAlertForAlertPageType:(nullable NSString *)pageType delegate:(_Nullable id)delegate; + (void)logAlertForAlertObject:(nullable MVMCoreAlertObject *)alertObject delegate:(_Nullable id)delegate;
@end @end

View File

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