Migration
This commit is contained in:
parent
91260a0f98
commit
c7afc959e5
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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];
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -25,4 +25,7 @@
|
||||
// Returns a UIColor
|
||||
+ (nonnull UIColor *)getColorForHexString:(nonnull NSString *)hexString;
|
||||
|
||||
// Returns if the device is an ipad
|
||||
+ (BOOL)isOnIPad;
|
||||
|
||||
@end
|
||||
|
||||
@ -50,4 +50,12 @@
|
||||
alpha:1];
|
||||
}
|
||||
|
||||
+ (BOOL)isOnIPad {
|
||||
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
|
||||
return YES;
|
||||
} else {
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user