Migration

This commit is contained in:
Pfeil, Scott Robert 2019-01-10 14:23:14 -05:00
parent 91260a0f98
commit c7afc959e5
6 changed files with 22 additions and 1 deletions

View File

@ -17,4 +17,7 @@
- (void)topAlertViewShown:(nonnull id)topAlert topAlertObject:(nonnull MVMCoreTopAlertObject *)topAlertObject;
- (void)topAlertViewDismissed:(nonnull id)topAlert;
// Called when the top alert is pressed. Determines if we should load the option the default way or not.
- (BOOL)shouldLoadTopAlertAction:(nullable NSDictionary *)actionMap additionalData:(nullable NSDictionary *)additionalData;
@end

View File

@ -17,6 +17,8 @@
@interface MVMCoreLoggingHandler : NSObject
+ (nullable instancetype)sharedLoggingHandler;
+ (void)addErrorToLog:(nonnull MVMCoreErrorObject *)errorObject;
+ (void)logDebugMessageWithDelegate:(nullable NSString *)message;
+ (void)logWithDelegateWithObject:(nullable id)object withName:(nullable NSString *)name withExtraInfo:(nullable NSDictionary *)extra;

View File

@ -11,6 +11,10 @@
@implementation MVMCoreLoggingHandler
+ (nullable instancetype)sharedLoggingHandler {
return [MVMCoreObject sharedInstance].loggingDelegate;
}
+ (void)addErrorToLog:(nonnull MVMCoreErrorObject *)errorObject {
if (errorObject && [[MVMCoreObject sharedInstance].loggingDelegate respondsToSelector:@selector(addErrorToLog:)]) {
[[MVMCoreObject sharedInstance].loggingDelegate addErrorToLog:errorObject];

View File

@ -17,6 +17,7 @@
#import <MVMCore/MVMCoreMainSplitViewProtocol.h>
#import <MVMCore/MVMCoreLoggingDelegateProtocol.h>
#import <MVMCore/MVMCoreGlobalTopAlertDelegateProtocol.h>
#import <MVMCore/MVMCoreLoggingHandler.h>
@interface MVMCoreObject : NSObject
@ -30,7 +31,7 @@
@property (nullable, weak, nonatomic) NSObject <MVMCoreMainSplitViewProtocol> *splitViewDelegate;
@property (nullable, weak, nonatomic) id <MVMCoreGlobalLoadProtocol> globalLoadDelegate;
@property (nullable, weak, nonatomic) id <MVMCoreLoadingOverlayDelegateProtocol> loadingProtocol;
@property (nullable, weak, nonatomic) id <MVMCoreLoggingDelegateProtocol> loggingDelegate;
@property (nullable, weak, nonatomic) MVMCoreLoggingHandler <MVMCoreLoggingDelegateProtocol> *loggingDelegate;
@property (nullable, weak, nonatomic) id <MVMCoreGlobalTopAlertDelegateProtocol> globalTopAlertDelegate;
// A singleton.

View File

@ -25,4 +25,7 @@
// Returns a UIColor
+ (nonnull UIColor *)getColorForHexString:(nonnull NSString *)hexString;
// Returns if the device is an ipad
+ (BOOL)isOnIPad;
@end

View File

@ -50,4 +50,12 @@
alpha:1];
}
+ (BOOL)isOnIPad {
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
return YES;
} else {
return NO;
}
}
@end