remvoed accidental framework
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
66a71fbfde
commit
64cc3ad997
@ -1,52 +0,0 @@
|
||||
//
|
||||
// MFFreebeeHandler.h
|
||||
// mobilefirst
|
||||
//
|
||||
// Created by Patrick Sommer on 1/3/17.
|
||||
// Copyright © 2017 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@class FreeBeeAuthObject;
|
||||
@class MVMCoreOperation;
|
||||
@class MFFreebeeOperation;
|
||||
|
||||
typedef void(^FreebeeLoadFinishedHandler)(MVMCoreOperation* _Nullable freebeeOperation, BOOL isValid);
|
||||
|
||||
@interface MFFreebeeHandler : NSObject
|
||||
|
||||
@property(nullable, nonatomic, strong, readonly) FreeBeeAuthObject* freeBeeAuthObj;
|
||||
|
||||
@property(nonatomic, readonly) BOOL isValidCampaign;
|
||||
@property(nonatomic, readonly) MFFreebeeOperation* _Nullable freebeeOperation;
|
||||
|
||||
+ (nullable instancetype)sharedHandler;
|
||||
|
||||
- (void)activateFreeBeeIfServerEnabled;
|
||||
- (void)invalidateFreeBeeState;
|
||||
|
||||
- (void)processFreeBeeAuthRequestWithCompletionHandler:(nullable FreebeeLoadFinishedHandler)completionHandler;
|
||||
- (BOOL)canProceedWithFreebeeAuthRequest;
|
||||
- (BOOL)isFreeBeeEnabled;
|
||||
- (BOOL)isExpired;
|
||||
|
||||
- (void)enableFreeBeeForCurrentModule:(BOOL)enable;
|
||||
- (BOOL)isFreeBeeEnabledForCurrentModule;
|
||||
- (BOOL)isExcludedModule:(nullable NSString*)parentPageType;
|
||||
- (BOOL)isAllowedPage:(nullable NSString*)pageType;
|
||||
|
||||
- (void)printStatusDescription;
|
||||
|
||||
- (nullable NSDictionary*)proxyDictionaryforUrl:(nullable NSURL*)url;
|
||||
- (nullable NSDictionary*)campaignHeaderforUrl:(nullable NSURL*)url;
|
||||
|
||||
- (BOOL)isFreeBeeAuthorizedValidUrl:(nullable NSURL*)url;
|
||||
- (nullable NSString*)urlForidFromConfigDict:(nonnull NSString*)urlId;
|
||||
|
||||
// Tries to get the data using freebee. If freebee is not enabled, gets the data without freebee.
|
||||
- (nullable NSData*)freebee_dataWithContentsOfURL:(NSURL *_Nullable)url;
|
||||
- (nullable NSCachedURLResponse*)freebee_dataWithImageURL:(NSURL *_Nullable)imageURL;
|
||||
|
||||
- (void)configureFreeBeeWithDict:(nullable NSDictionary*)configDict withSessionReset:(BOOL)isReset;
|
||||
@end
|
||||
@ -1,216 +0,0 @@
|
||||
// Generated by Apple Swift version 5.0.1 (swiftlang-1001.0.82.4 clang-1001.0.46.5)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wgcc-compat"
|
||||
|
||||
#if !defined(__has_include)
|
||||
# define __has_include(x) 0
|
||||
#endif
|
||||
#if !defined(__has_attribute)
|
||||
# define __has_attribute(x) 0
|
||||
#endif
|
||||
#if !defined(__has_feature)
|
||||
# define __has_feature(x) 0
|
||||
#endif
|
||||
#if !defined(__has_warning)
|
||||
# define __has_warning(x) 0
|
||||
#endif
|
||||
|
||||
#if __has_include(<swift/objc-prologue.h>)
|
||||
# include <swift/objc-prologue.h>
|
||||
#endif
|
||||
|
||||
#pragma clang diagnostic ignored "-Wauto-import"
|
||||
#include <Foundation/Foundation.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#if !defined(SWIFT_TYPEDEFS)
|
||||
# define SWIFT_TYPEDEFS 1
|
||||
# if __has_include(<uchar.h>)
|
||||
# include <uchar.h>
|
||||
# elif !defined(__cplusplus)
|
||||
typedef uint_least16_t char16_t;
|
||||
typedef uint_least32_t char32_t;
|
||||
# endif
|
||||
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_PASTE)
|
||||
# define SWIFT_PASTE_HELPER(x, y) x##y
|
||||
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
|
||||
#endif
|
||||
#if !defined(SWIFT_METATYPE)
|
||||
# define SWIFT_METATYPE(X) Class
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS_PROPERTY)
|
||||
# if __has_feature(objc_class_property)
|
||||
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
|
||||
# else
|
||||
# define SWIFT_CLASS_PROPERTY(...)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if __has_attribute(objc_runtime_name)
|
||||
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
|
||||
#else
|
||||
# define SWIFT_RUNTIME_NAME(X)
|
||||
#endif
|
||||
#if __has_attribute(swift_name)
|
||||
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
|
||||
#else
|
||||
# define SWIFT_COMPILE_NAME(X)
|
||||
#endif
|
||||
#if __has_attribute(objc_method_family)
|
||||
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
|
||||
#else
|
||||
# define SWIFT_METHOD_FAMILY(X)
|
||||
#endif
|
||||
#if __has_attribute(noescape)
|
||||
# define SWIFT_NOESCAPE __attribute__((noescape))
|
||||
#else
|
||||
# define SWIFT_NOESCAPE
|
||||
#endif
|
||||
#if __has_attribute(warn_unused_result)
|
||||
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
|
||||
#else
|
||||
# define SWIFT_WARN_UNUSED_RESULT
|
||||
#endif
|
||||
#if __has_attribute(noreturn)
|
||||
# define SWIFT_NORETURN __attribute__((noreturn))
|
||||
#else
|
||||
# define SWIFT_NORETURN
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS_EXTRA)
|
||||
# define SWIFT_CLASS_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_PROTOCOL_EXTRA)
|
||||
# define SWIFT_PROTOCOL_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM_EXTRA)
|
||||
# define SWIFT_ENUM_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS)
|
||||
# if __has_attribute(objc_subclassing_restricted)
|
||||
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
|
||||
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# else
|
||||
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_PROTOCOL)
|
||||
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
|
||||
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_EXTENSION)
|
||||
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
|
||||
#endif
|
||||
|
||||
#if !defined(OBJC_DESIGNATED_INITIALIZER)
|
||||
# if __has_attribute(objc_designated_initializer)
|
||||
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
|
||||
# else
|
||||
# define OBJC_DESIGNATED_INITIALIZER
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM_ATTR)
|
||||
# if defined(__has_attribute) && __has_attribute(enum_extensibility)
|
||||
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
|
||||
# else
|
||||
# define SWIFT_ENUM_ATTR(_extensibility)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM)
|
||||
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
|
||||
# if __has_feature(generalized_swift_name)
|
||||
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
|
||||
# else
|
||||
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_UNAVAILABLE)
|
||||
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
|
||||
#endif
|
||||
#if !defined(SWIFT_UNAVAILABLE_MSG)
|
||||
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
|
||||
#endif
|
||||
#if !defined(SWIFT_AVAILABILITY)
|
||||
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
|
||||
#endif
|
||||
#if !defined(SWIFT_DEPRECATED)
|
||||
# define SWIFT_DEPRECATED __attribute__((deprecated))
|
||||
#endif
|
||||
#if !defined(SWIFT_DEPRECATED_MSG)
|
||||
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
|
||||
#endif
|
||||
#if __has_feature(attribute_diagnose_if_objc)
|
||||
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
|
||||
#else
|
||||
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
|
||||
#endif
|
||||
#if __has_feature(modules)
|
||||
#if __has_warning("-Watimport-in-framework-header")
|
||||
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
||||
#endif
|
||||
@import Foundation;
|
||||
@import ObjectiveC;
|
||||
#endif
|
||||
|
||||
#import <MVMCore/MVMCore.h>
|
||||
|
||||
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
|
||||
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
|
||||
#if __has_warning("-Wpragma-clang-attribute")
|
||||
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
|
||||
#endif
|
||||
#pragma clang diagnostic ignored "-Wunknown-pragmas"
|
||||
#pragma clang diagnostic ignored "-Wnullability"
|
||||
|
||||
#if __has_attribute(external_source_symbol)
|
||||
# pragma push_macro("any")
|
||||
# undef any
|
||||
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="MVMCore",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
|
||||
# pragma pop_macro("any")
|
||||
#endif
|
||||
|
||||
@protocol MVMCoreActionDelegateProtocol;
|
||||
@protocol NSObject;
|
||||
@protocol MVMCoreLoadDelegateProtocol;
|
||||
@protocol MVMCoreAlertDelegateProtocol;
|
||||
@protocol MVMCoreTopAlertDelegateProtocol;
|
||||
@protocol MVMCorePresentationDelegateProtocol;
|
||||
|
||||
SWIFT_CLASS("_TtC7MVMCore14DelegateObject")
|
||||
@interface DelegateObject : NSObject
|
||||
@property (nonatomic, weak) id <MVMCoreActionDelegateProtocol, NSObject> _Nullable actionDelegate;
|
||||
@property (nonatomic, weak) id <MVMCoreLoadDelegateProtocol, NSObject> _Nullable loadDelegate;
|
||||
@property (nonatomic, weak) id <MVMCoreAlertDelegateProtocol, NSObject> _Nullable alertDelegate;
|
||||
@property (nonatomic, weak) id <MVMCoreTopAlertDelegateProtocol, NSObject> _Nullable topAlertDelegate;
|
||||
@property (nonatomic, weak) id <MVMCorePresentationDelegateProtocol, NSObject> _Nullable presentationDelegate;
|
||||
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
||||
- (void)setAllWithDelegate:(id _Nonnull)delegate;
|
||||
+ (nonnull instancetype)createWithDelegateForAll:(id _Nonnull)delegate SWIFT_WARN_UNUSED_RESULT;
|
||||
@end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#if __has_attribute(external_source_symbol)
|
||||
# pragma clang attribute pop
|
||||
#endif
|
||||
#pragma clang diagnostic pop
|
||||
@ -1,103 +0,0 @@
|
||||
//
|
||||
// MVMCore.h
|
||||
// MVMCore
|
||||
//
|
||||
// Created by Yang, Tianhang (Chris) on 11/9/17.
|
||||
// Copyright © 2017 myverizon. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
//! Project version number for MVMCore.
|
||||
FOUNDATION_EXPORT double MVMCoreVersionNumber;
|
||||
|
||||
//! Project version string for MVMCore.
|
||||
FOUNDATION_EXPORT const unsigned char MVMCoreVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <MVMCore/PublicHeader.h>
|
||||
|
||||
// Constants
|
||||
#import <MVMCore/MVMCoreErrorConstants.h>
|
||||
#import <MVMCore/MVMCoreJSONConstants.h>
|
||||
#import <MVMCore/MVMCoreHardcodedStringsConstants.h>
|
||||
#import <MVMCore/MVMCoreConstants.h>
|
||||
|
||||
// Categories
|
||||
#import <MVMCore/NSArray+MFConvenience.h>
|
||||
#import <MVMCore/NSDictionary+MFConvenience.h>
|
||||
#import <MVMCore/UILabel+MFCustom.h>
|
||||
#import <MVMCore/NSDecimalNumber+MFConvenience.h>
|
||||
#import <MVMCore/UIFont+MFSpacing.h>
|
||||
|
||||
// Utility
|
||||
#import <MVMCore/MVMCoreDispatchUtility.h>
|
||||
#import <MVMCore/MVMCoreGetterUtility.h>
|
||||
#import <MVMCore/MVMCoreErrorObject.h>
|
||||
#import <MVMCore/MVMCoreOperation.h>
|
||||
#import <MVMCore/MVMCoreObject.h>
|
||||
#import <MVMCore/MVMCoreBlockOperation.h>
|
||||
|
||||
// Mapping
|
||||
#import <MVMCore/MVMCoreViewControllerMappingObject.h>
|
||||
#import <MVMCore/MVMCoreViewControllerNibMappingObject.h>
|
||||
#import <MVMCore/MVMCoreViewControllerProgrammaticMappingObject.h>
|
||||
#import <MVMCore/MVMCoreViewControllerStoryBoardMappingObject.h>
|
||||
|
||||
// Load Handling
|
||||
#import <MVMCore/MVMCoreLoadDelegateProtocol.h>
|
||||
#import <MVMCore/MVMCoreRequestParameters.h>
|
||||
#import <MVMCore/MVMCoreLoadObject.h>
|
||||
#import <MVMCore/MVMCoreLoadingOverlayHandler.h>
|
||||
#import <MVMCore/MVMCoreLoadingOverlayDelegateProtocol.h>
|
||||
#import <MVMCore/MVMCoreLoadHandler.h>
|
||||
#import <MVMCore/MVMCoreLoadRequestOperation.h>
|
||||
#import <MVMCore/MVMCoreGlobalLoadProtocol.h>
|
||||
|
||||
// Alert Handling
|
||||
#import <MVMCore/MVMCoreAlertController.h>
|
||||
#import <MVMCore/MVMCoreAlertObject.h>
|
||||
#import <MVMCore/MVMCoreTopAlertObject.h>
|
||||
#import <MVMCore/MVMCoreAlertoperation.h>
|
||||
#import <MVMCore/MVMCoreAlertHandler.h>
|
||||
#import <MVMCore/MVMCoreTopAlertAnimationDelegateProtocol.h>
|
||||
#import <MVMCore/MVMCoreTopAlertDelegateProtocol.h>
|
||||
#import <MVMCore/MVMCoreGlobalTopAlertDelegateProtocol.h>
|
||||
#import <MVMCore/MVMCoreTopAlertViewProtocol.h>
|
||||
#import <MVMCore/MVMCoreAlertDelegateProtocol.h>
|
||||
|
||||
// Presentation Handling
|
||||
#import <MVMCore/MVMCorePresentationDelegateProtocol.h>
|
||||
#import <MVMCore/MVMCoreNavigationHandler.h>
|
||||
#import <MVMCore/MVMCoreNavigationObject.h>
|
||||
#import <MVMCore/MVMCoreDismissViewControllerOperation.h>
|
||||
#import <MVMCore/MVMCorePresentAnimationOperation.h>
|
||||
#import <MVMCore/MVMCorePresentViewControllerOperation.h>
|
||||
#import <MVMCore/MVMCoreNavigationOperation.h>
|
||||
#import <MVMCore/MVMCoreViewControllerAnimatedTransitioning.h>
|
||||
|
||||
// Action Handling
|
||||
#import <MVMCore/MVMCoreActionHandler.h>
|
||||
#import <MVMCore/MVMCoreActionDelegateProtocol.h>
|
||||
#import <MVMCore/MVMCoreActionUtility.h>
|
||||
#import <MVMCore/MVMCoreTopAlertOperation.h>
|
||||
|
||||
// Protocols
|
||||
#import <MVMCore/MVMCoreViewControllerProtocol.h>
|
||||
#import <MVMCore/MVMCoreViewManagerProtocol.h>
|
||||
#import <MVMCore/MVMCoreViewManagerViewControllerProtocol.h>
|
||||
#import <MVMCore/MVMCoreViewProtocol.h>
|
||||
#import <MVMCore/MVMCoreLoggingDelegateProtocol.h>
|
||||
|
||||
// Other Handlers and Protocols
|
||||
#import <MVMCore/MVMCoreLoggingHandler.h>
|
||||
|
||||
// Singletons
|
||||
#import <MVMCore/MVMCoreCache.h>
|
||||
#import <MVMCore/MVMCoreSessionTimeHandler.h>
|
||||
#import <MVMCore/MVMCoreSessionObject.h>
|
||||
|
||||
// Main Views
|
||||
|
||||
|
||||
//Freebee
|
||||
#import <MVMCore/MFFreebeeHandler.h>
|
||||
@ -1,52 +0,0 @@
|
||||
//
|
||||
// MVMCoreActionDelegateProtocol.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by Scott Pfeil on 11/20/15.
|
||||
// Copyright © 2015 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@class MVMCoreErrorObject;
|
||||
@class MVMCoreRequestParameters;
|
||||
@class MVMCoreAlertObject;
|
||||
|
||||
@protocol MVMCoreActionDelegateProtocol
|
||||
|
||||
@optional
|
||||
|
||||
// Gives the delegate an opportunity to do it's own logging. If not it will do it's own logging.
|
||||
- (void)logActionWithActionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData;
|
||||
|
||||
// Handles the open page actions. Can overwrite for special loading.
|
||||
- (void)handleOpenPageForRequestParameters:(nonnull MVMCoreRequestParameters *)requestParameters actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData;
|
||||
|
||||
// Handles the back actions. Can overwrite for special loading.
|
||||
- (void)handleBackAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData;
|
||||
|
||||
// Prepares to call the previous submit request again. Can overwrite for special loading. Be sure to call submit() block to perform the actual load.
|
||||
- (void)prepareRequestForPreviousSubmission:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData submit:(nonnull void (^)(MVMCoreRequestParameters * _Nonnull requestParameters, NSDictionary * _Nullable dataForPage))submit;
|
||||
|
||||
// Handles the linkaway action. Call the block to continue to linkaway.
|
||||
- (void)shouldLinkAwayWithURL:(nullable NSURL *)URL appURL:(nullable NSURL *)appURL actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData linkAwayBlock:(nonnull void (^)(NSURL * _Nullable appURL, NSURL * _Nullable URL, NSDictionary * _Nullable actionInformation, NSDictionary * _Nullable additionalData))linkAwayBlock;
|
||||
|
||||
// Gives the delegate a chance to alter the alert object
|
||||
- (void)willShowPopupWithAlertObject:(nonnull MVMCoreAlertObject *)alertObject alertJson:(nonnull NSDictionary *)alertJson;
|
||||
|
||||
// Gives the delegate a chance to alter the alert object
|
||||
- (nullable MVMCoreAlertObject *)willShowTopAlertWithAlertObject:(nonnull MVMCoreAlertObject *)alertObject alertJson:(nonnull NSDictionary *)alertJson;
|
||||
|
||||
// Handle cancel
|
||||
- (void)handleCancel:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData;
|
||||
|
||||
// Handles any unknown action types. Can overwrite for more specific handling.
|
||||
- (void)handleUnknownActionType:(nullable NSString *)actionType actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData;
|
||||
|
||||
// Handles any action errors. Can overwrite for more specific handling.
|
||||
- (void)handleActionError:(nonnull MVMCoreErrorObject *)error additionalData:(nullable NSDictionary *)additionalData;
|
||||
|
||||
// Lets the delegate know that another internal module app is about to be launched
|
||||
- (void)prepareForOpenOtherAppModule:(nullable NSString *)module;
|
||||
|
||||
@end
|
||||
@ -1,176 +0,0 @@
|
||||
//
|
||||
// MVMCoreActionHandler.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by Scott Pfeil on 11/20/15.
|
||||
// Copyright © 2015 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
// Can be subclassed to handle app specific actions as well.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <MVMCore/MVMCoreActionDelegateProtocol.h>
|
||||
#import <MVMCore/MVMCoreLoadDelegateProtocol.h>
|
||||
#import <MVMCore/MVMCorePresentationDelegateProtocol.h>
|
||||
@class DelegateObject;
|
||||
|
||||
extern NSString * _Nonnull const KeyActionType;
|
||||
extern NSString * _Nonnull const KeyActionTypeLinkAway;
|
||||
extern NSString * _Nonnull const KeyActionTypeOpen;
|
||||
|
||||
@interface MVMCoreActionHandler : NSObject
|
||||
|
||||
// Returns the shared action handler
|
||||
+ (nullable instancetype)sharedActionHandler;
|
||||
|
||||
// Convenience function for handling actions. This will pull action and pageInfo out of the dictionary and call handleAction: actionInformation: with those values
|
||||
- (void)handleActionWithDictionary:(nullable NSDictionary *)dictionary additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
// Handles actions. Used by server driven user actions..
|
||||
- (void)handleAction:(nullable NSString *)actionType actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
#pragma mark - Actions
|
||||
// by default, returns the original RequestParameter that passed in. Can be overriden for some generic updates to the RequestParameter before handle open page action gets called.
|
||||
- (void)updateRequestParametersBeforeHandleOpenPageAction:(nonnull MVMCoreRequestParameters *)requestParameters callBack:(void (^_Nonnull)(MVMCoreRequestParameters * _Nonnull requestParameters))callback;
|
||||
|
||||
// Logs the action. Currently is not action information driven... depends on delegate.
|
||||
- (void)logAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
// Tries to open a page
|
||||
- (void)openPageAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
// restarts the app
|
||||
- (void)restartAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
// Goes back
|
||||
- (void)backAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
// Makes a phone call
|
||||
- (void)callAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
// Makes the previous request, needs the delegate for this
|
||||
- (void)previousSubmitAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
// Shows a popup
|
||||
- (void)popupAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
// Shows a top alert
|
||||
- (void)topAlertAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
// Redirects to another experience
|
||||
- (void)redirectAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
// Cancels (like in a popup)
|
||||
- (void)cancelAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
// Goes to settings app
|
||||
- (void)settingsAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
// Collapses the current top notification
|
||||
- (void)collapseNotificationAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
// Subclass this to handle other custom actions. Return YES if handled, and NO if not.
|
||||
- (BOOL)handleOtherActions:(nullable NSString *)actionType actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
// Last chance to handle unknown actions before throwing an error
|
||||
- (void)unknownAction:(nullable NSString *)actionType actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
// Handles action errors.
|
||||
- (void)handleActionError:(nullable MVMCoreErrorObject *)error actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
#pragma mark - Link away action
|
||||
|
||||
// Links away to app or browser
|
||||
- (void)linkAwayAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
// Can subclass to add to urls if needed at global level (delegate is also called)
|
||||
- (void)prepareLinkAwayWithURL:(nullable NSURL *)url appURL:(nullable NSURL *)appURL actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
// Opens the url
|
||||
- (void)openURL:(nullable NSURL *)url appURL:(nullable NSURL *)appURL actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
// opens the url in a webview.
|
||||
- (void)openURLInWebView:(nullable NSURL *)url actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
#pragma mark - Default Action Protocol Functions
|
||||
|
||||
// Sends the request to the load handler.
|
||||
+ (void)defaultHandleOpenPageForRequestParameters:(nonnull MVMCoreRequestParameters *)requestParameters additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
// By default, throws an error, calling defaultHandleActionError.
|
||||
+ (void)defaultHandleUnknownActionType:(nullable NSString *)actionType actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
// Shows a popup error
|
||||
+ (void)defaultHandleActionError:(nonnull MVMCoreErrorObject *)error additionalData:(nullable NSDictionary *)additionalData;
|
||||
|
||||
#pragma mark - Deprecated
|
||||
|
||||
// Convenience function for handling actions. This will pull action and pageInfo out of the dictionary and call handleAction: actionInformation: with those values
|
||||
- (void)handleActionWithDictionary:(nullable NSDictionary *)dictionary additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol,MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
||||
|
||||
// Handles actions. Used by server driven user actions..
|
||||
- (void)handleAction:(nullable NSString *)actionType actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol,MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
||||
|
||||
// Logs the action. Currently is not action information driven... depends on delegate.
|
||||
- (void)logAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
||||
|
||||
// Tries to open a page
|
||||
- (void)openPageAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
||||
|
||||
// restarts the app
|
||||
- (void)restartAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
||||
|
||||
// Goes back
|
||||
- (void)backAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
||||
|
||||
// Makes a phone call
|
||||
- (void)callAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
||||
|
||||
// Makes the previous request, needs the delegate for this
|
||||
- (void)previousSubmitAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
||||
|
||||
// Shows a popup
|
||||
- (void)popupAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
||||
|
||||
// Shows a top alert
|
||||
- (void)topAlertAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
||||
|
||||
// Redirects to another experience
|
||||
- (void)redirectAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
||||
|
||||
// Cancels (like in a popup)
|
||||
- (void)cancelAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
||||
|
||||
// Goes to settings app
|
||||
- (void)settingsAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
||||
|
||||
// Collapses the current top notification
|
||||
- (void)collapseNotificationAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
||||
|
||||
// Subclass this to handle other custom actions. Return YES if handled, and NO if not.
|
||||
- (BOOL)handleOtherActions:(nullable NSString *)actionType actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
||||
|
||||
// Last chance to handle unknown actions before throwing an error
|
||||
- (void)unknownAction:(nullable NSString *)actionType actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
||||
|
||||
// Handles action errors.
|
||||
- (void)handleActionError:(nullable MVMCoreErrorObject *)error actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
||||
|
||||
// Links away to app or browser
|
||||
- (void)linkAwayAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
||||
|
||||
// Can subclass to add to urls if needed at global level (delegate is also called)
|
||||
- (void)prepareLinkAwayWithURL:(nullable NSURL *)url appURL:(nullable NSURL *)appURL actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
||||
|
||||
// Opens the url
|
||||
- (void)openURL:(nullable NSURL *)url appURL:(nullable NSURL *)appURL actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
||||
|
||||
// opens the url in a webview.
|
||||
- (void)openURLInWebView:(nullable NSURL *)url actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
||||
|
||||
// Sends the request to the load handler.
|
||||
+ (void)defaultHandleOpenPageForRequestParameters:(nonnull MVMCoreRequestParameters *)requestParameters additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject<MVMCoreLoadDelegateProtocol,MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
||||
|
||||
// By default, throws an error, calling defaultHandleActionError.
|
||||
+ (void)defaultHandleUnknownActionType:(nullable NSString *)actionType actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
||||
|
||||
@end
|
||||
@ -1,32 +0,0 @@
|
||||
//
|
||||
// MVMCoreActionUtility.h
|
||||
// MVMCore
|
||||
//
|
||||
// Created by Pfeil, Scott Robert on 11/14/17.
|
||||
// Copyright © 2017 myverizon. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <MVMCore/MVMCoreViewControllerProtocol.h>
|
||||
#import <MVMCore/MVMCoreLoadObject.h>
|
||||
#import <MVMCore/MVMCorePresentationDelegateProtocol.h>
|
||||
|
||||
@interface MVMCoreActionUtility : NSObject
|
||||
|
||||
// Takes a dictionary and formats it into a json string.
|
||||
+ (nonnull NSString *)formatDictionaryAsJSONString:(nonnull NSDictionary *)dictionary;
|
||||
|
||||
// Links away to safari or another app. Returns if successful.
|
||||
+ (BOOL)linkAway:(nullable NSString *)safariURLString appURLString:(nullable NSString *)appURLString;
|
||||
|
||||
// Can call to display a view controller based on the load object in the same way the architecture does it. Will check the presentation style of the page, action, and request. Will check if needs a view manager.
|
||||
+ (void)displayViewController:(nonnull UIViewController <MVMCoreViewControllerProtocol> *)viewController forLoadObject:(nullable MVMCoreLoadObject *)loadObject presentationDelegate:(nullable NSObject<MVMCorePresentationDelegateProtocol>*)delegate completionHandler:(nullable void (^)(void))completionBlock;
|
||||
|
||||
// returns if the class is not the same or a subclass of the other class. Can pass throw an exception as well
|
||||
+ (BOOL)classIsInstanceTypeOfClass:(nonnull Class)theClass otherClass:(nonnull Class)otherClass throwException:(BOOL)throwException;
|
||||
|
||||
// Calls the above function with throw exception yes if the object is not nil. Returns the object. Convenience function for one liner in initializer.
|
||||
+ (nonnull id)initializerClassCheck:(nullable NSObject *)object classToVerify:(nonnull Class)classToVerify;
|
||||
|
||||
@end
|
||||
@ -1,18 +0,0 @@
|
||||
//
|
||||
// MVMCoreAlertController.h
|
||||
// alerts
|
||||
//
|
||||
// Created by Scott Pfeil on 10/22/14.
|
||||
// Copyright (c) 2014 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
// Used by our alert handler. Not for subclassing. Simply keeps track of if it's visible. Tries to parallel the UIAlertView to make it easier for the MVMCoreAlertHandler.
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
@class MVMCoreAlertObject;
|
||||
|
||||
@interface MVMCoreAlertController : UIAlertController
|
||||
|
||||
@property (nonatomic, readonly, getter=isVisible) BOOL visible;
|
||||
@property (nullable, nonatomic, strong) MVMCoreAlertObject *alertObject;
|
||||
|
||||
@end
|
||||
@ -1,28 +0,0 @@
|
||||
//
|
||||
// MVMCoreAlertDelegateProtocol.h
|
||||
// mobilefirst
|
||||
//
|
||||
// Created by Pfeil, Scott Robert on 8/8/17.
|
||||
// Copyright © 2017 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
// Called for popup style alerts.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
@class MVMCoreAlertObject;
|
||||
|
||||
@protocol MVMCoreAlertDelegateProtocol
|
||||
|
||||
@optional
|
||||
|
||||
// helps tracking alert state
|
||||
- (nullable NSDictionary *)additionalAlertDataToTrackForAlertWithObject:(nullable MVMCoreAlertObject *)alertObject;
|
||||
|
||||
// All are performed on the main thread.
|
||||
- (void)alertShown:(nonnull UIAlertController *)alertController;
|
||||
- (void)alertCancelled:(nonnull UIAlertController *)alertController;
|
||||
- (void)alertDismissed:(nonnull UIAlertController *)alertController;
|
||||
- (void)alertPaused:(nonnull UIAlertController *)alertController;
|
||||
- (void)alertUnpaused:(nonnull UIAlertController *)alertController;
|
||||
|
||||
@end
|
||||
|
||||
@ -1,93 +0,0 @@
|
||||
//
|
||||
// MVMCoreAlertHandler.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by Scott Pfeil on 3/10/14.
|
||||
// Copyright (c) 2014 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
// Keeps track of alerts and handles them. Should always use this to present alerts in mf.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <MVMCore/MVMCoreTopAlertObject.h>
|
||||
#import <MVMCore/MVMCoreAlertDelegateProtocol.h>
|
||||
|
||||
@class MVMCoreAlertObject;
|
||||
|
||||
@interface MVMCoreAlertHandler : NSObject
|
||||
|
||||
// Returns the shared instance of this singleton
|
||||
+ (nullable instancetype)sharedAlertHandler;
|
||||
|
||||
#pragma mark - Popup Alert Functions
|
||||
|
||||
// Returns if any alert is currently showing (even if supressed).
|
||||
- (BOOL)alertCurrentlyShowing;
|
||||
|
||||
// Returns if a greedy alert is currently showing (even if supressed).
|
||||
- (BOOL)greedyAlertShowing;
|
||||
|
||||
/** Shows the popup with the passed in parameter.
|
||||
* @param title The title of the alert.
|
||||
* @param message The message of the alert.
|
||||
* @param actions An array of actions for the alert.
|
||||
* @param isGreedy Sets up a greedy popup. In other words, any popups currently shown or queued are dismissed.
|
||||
* @return Returns the UIAlertController.
|
||||
*/
|
||||
- (nonnull UIAlertController *)showAlertWithTitle:(nullable NSString *)title message:(nullable NSString *)message actions:(nullable NSArray<UIAlertAction *>*)actions isGreedy:(BOOL)isGreedy;
|
||||
|
||||
/** Shows the alert.
|
||||
* @param title The title of the alert.
|
||||
* @param message The message of the alert.
|
||||
* @param actions An array of actions for the alert.
|
||||
* @param alertStyle Popup or action sheet
|
||||
* @param isGreedy Sets up a greedy alert. In other words, any alerts currently shown or queued are dismissed.
|
||||
* @param alertDelegate The delegate to be notified.
|
||||
* @return Returns the UIAlertController.
|
||||
*/
|
||||
- (nonnull UIAlertController *)showAlertWithTitle:(nullable NSString *)title message:(nullable NSString *)message actions:(nullable NSArray<UIAlertAction *>*)actions alertStyle:(UIAlertControllerStyle)alertStyle isGreedy:(BOOL)isGreedy alertDelegate:(nullable NSObject <MVMCoreAlertDelegateProtocol>*)alertDelegate;
|
||||
|
||||
/** Shows the popup with the passed in alert object. This is a convenience method that automatically handles using the proper alert type based on what's available.
|
||||
* @param alertObject The alert object to use for the alert.
|
||||
* @return Returns UIAlertController.
|
||||
*/
|
||||
- (nonnull UIAlertController *)showAlertWithAlertObject:(nonnull MVMCoreAlertObject *)alertObject;
|
||||
|
||||
// Removes all alerts.
|
||||
- (void)removeAllAlertViews;
|
||||
|
||||
#pragma mark - Supression Functions
|
||||
|
||||
// Returns true if alerts are supressed.
|
||||
- (BOOL)mfAlertsSupressed;
|
||||
|
||||
// Supresses the alerts (Used by other "apps" in our app).
|
||||
- (void)supressMFAlerts;
|
||||
|
||||
// Unsupresses the alerts (Used by other "apps" in our app).
|
||||
- (void)unSupressMFAlerts;
|
||||
|
||||
#pragma mark - Top Alert Functions
|
||||
|
||||
// Show based on the object. Will be used by the architecture.
|
||||
- (void)showTopAlertWithObject:(nullable MVMCoreTopAlertObject *)topAlertObject;
|
||||
|
||||
// Convenience functions
|
||||
- (void)showTopAlertErrorWithMessage:(nullable NSString *)message;
|
||||
- (void)showTopAlertConfirmationWithMessage:(nullable NSString *)message;
|
||||
- (void)showTopAlertWithType:(nullable NSString *)type message:(nullable NSString *)message subMessage:(nullable NSString *)subMessage persistent:(BOOL)persistent actionMap:(nullable NSDictionary *)actionMap additionalData:(nullable NSDictionary *)additionalData;
|
||||
- (void)showTopAlertWithType:(nullable NSString *)type message:(nullable NSString *)message subMessage:(nullable NSString *)subMessage persistent:(BOOL)persistent buttonTitle:(nullable NSString *)buttonTitle userActionHandler:(nullable void (^)(id _Nonnull sender))userActionHandler;
|
||||
|
||||
// Hides the current alert view.
|
||||
- (void)hideTopAlertView;
|
||||
|
||||
// Hides a persistent alert based on the type string.
|
||||
- (void)hidePersistentTopAlertViewOfType:(nullable NSString *)type;
|
||||
|
||||
// Removes all top alerts.
|
||||
- (void)removeAllTopAlerts;
|
||||
|
||||
/// Returns YES if the persistent type is already registered in the alert queue.
|
||||
- (BOOL)hasPersistentTopAlertOfType:(nullable NSString *)type;
|
||||
|
||||
@end
|
||||
@ -1,72 +0,0 @@
|
||||
//
|
||||
// MVMCoreAlertObject.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by Scott Pfeil on 11/21/14.
|
||||
// Copyright (c) 2014 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
// An object for keeping track of all alert variables. Easier to pass around.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <MVMCore/MVMCoreActionDelegateProtocol.h>
|
||||
#import <MVMCore/MVMCoreLoadDelegateProtocol.h>
|
||||
#import <MVMCore/MVMCorePresentationDelegateProtocol.h>
|
||||
#import <MVMCore/MVMCoreAlertDelegateProtocol.h>
|
||||
|
||||
@class MVMCoreErrorObject;
|
||||
@class MVMCoreLoadObject;
|
||||
@class DelegateObject;
|
||||
|
||||
typedef NS_ENUM(NSInteger, MFAlertType) {
|
||||
MFAlertTypePopup = 0,
|
||||
MFAlertTypeField,
|
||||
MFAlertTypeTop,
|
||||
MFAlertTypeNone
|
||||
};
|
||||
|
||||
typedef void (^TextFieldErrorHandler)(NSArray * _Nonnull fieldErrors);
|
||||
|
||||
@interface MVMCoreAlertObject : NSObject
|
||||
|
||||
@property (nullable, strong, nonatomic) NSString *title;
|
||||
@property (nullable, copy, nonatomic) NSDictionary *pageJson;
|
||||
@property (nullable, strong, nonatomic) NSString *message;
|
||||
@property (nonnull, strong, nonatomic) NSArray *actions;
|
||||
@property (nonatomic) BOOL isGreedy;
|
||||
@property (nonatomic) UIAlertControllerStyle alertStyle;
|
||||
@property (nonatomic) MFAlertType type;
|
||||
@property (nonatomic) BOOL defaultAction;
|
||||
|
||||
@property (nonnull, strong, nonatomic) NSArray *fieldErrors;
|
||||
@property (nullable, nonatomic, copy) TextFieldErrorHandler textFieldErrorHandler;
|
||||
|
||||
// Set to be notified of popup style alert events.
|
||||
@property (nonatomic, weak, nullable) NSObject <MVMCoreAlertDelegateProtocol> *alertDelegate;
|
||||
|
||||
// Creates an alert object for an error with the passed in load object response info
|
||||
+ (nullable instancetype)alertObjectForLoadObject:(nullable MVMCoreLoadObject *)loadObject error:(nullable MVMCoreErrorObject *)error delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
+ (nullable instancetype)alertObjectForPageType:(nullable NSString *)pageType responseInfo:(nullable NSDictionary *)responseInfo additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
// Initializes a popup style alert object. Look at the alert handler to see what each is used for.
|
||||
- (nullable instancetype)initPopupAlertWithTitle:(nullable NSString *)title message:(nullable NSString *)message actions:(nonnull NSArray *)actions isGreedy:(BOOL)isGreedy;
|
||||
|
||||
// Initializes a popup style alert object using the error passed in. Message is formatted default style. By defualt uses the Okay button to just dismiss the error.
|
||||
- (nullable instancetype)initPopupAlertWithError:(nullable MVMCoreErrorObject *)error isGreedy:(BOOL)isGreedy;
|
||||
|
||||
// Same as above but no default actions. They are passed in.
|
||||
- (nullable instancetype)initPopupAlertWithError:(nullable MVMCoreErrorObject *)error actions:(nonnull NSArray *)actions isGreedy:(BOOL)isGreedy;
|
||||
|
||||
// Returns the alert object made with the page json. If there is not enough data to make, we will set error
|
||||
+ (nullable instancetype)alertObjectWithPage:(nullable NSDictionary *)page isGreedy:(BOOL)isGreedy additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject error:(MVMCoreErrorObject *_Nullable *_Nullable)error;
|
||||
|
||||
// Will show this alert in it's appropriate type style.
|
||||
- (void)showAlert;
|
||||
|
||||
#pragma mark - Deprecated
|
||||
|
||||
// Creates an alert object for an error with the passed in load object response info
|
||||
+ (nullable instancetype)alertObjectForLoadObject:(nullable MVMCoreLoadObject *)loadObject error:(nullable MVMCoreErrorObject *)error actionDelegate:(nullable NSObject <MVMCoreLoadDelegateProtocol,MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)actionDelegate __deprecated;
|
||||
+ (nullable instancetype)alertObjectForPageType:(nullable NSString *)pageType responseInfo:(nullable NSDictionary *)responseInfo additionalData:(nullable NSDictionary *)additionalData actionDelegate:(nullable NSObject <MVMCoreLoadDelegateProtocol,MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)actionDelegate __deprecated;
|
||||
+ (nullable instancetype)alertObjectWithPage:(nullable NSDictionary *)page isGreedy:(BOOL)isGreedy additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol,MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate error:(MVMCoreErrorObject *_Nullable *_Nullable)error __deprecated;
|
||||
|
||||
@end
|
||||
@ -1,36 +0,0 @@
|
||||
//
|
||||
// MVMCoreAlertOperation.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by Scott Pfeil on 9/28/15.
|
||||
// Copyright © 2015 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
// Operation for handling an alert. Should NOT be on the main queue.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "MVMCoreOperation.h"
|
||||
#import "MVMCoreAlertDelegateProtocol.h"
|
||||
|
||||
@interface MVMCoreAlertOperation : MVMCoreOperation
|
||||
|
||||
// If this operation is temporarily paused.
|
||||
@property (readonly, getter=isPaused) BOOL paused;
|
||||
|
||||
// If this alert is a greedy alert (See MVMCoreAlertHandler).
|
||||
@property (readonly, getter=isGreedy) BOOL greedy;
|
||||
|
||||
// The alert delegate if needed.
|
||||
@property (readonly, nullable, nonatomic, weak) NSObject <MVMCoreAlertDelegateProtocol> *alertDelegate;
|
||||
|
||||
// Initializes the operation with the alert to display and if it is greedy or not.
|
||||
- (nullable instancetype)initWithAlert:(nonnull UIAlertController *)alert isGreedy:(BOOL)isGreedy;
|
||||
- (nullable instancetype)initWithAlert:(nonnull UIAlertController *)alert isGreedy:(BOOL)isGreedy alertDelegate:(nullable id <MVMCoreAlertDelegateProtocol>)alertDelegate;
|
||||
|
||||
// Pauses the operation. Temporarily removes any alert.
|
||||
- (void)pause;
|
||||
|
||||
// Unpauses the operation, resuming any alert.
|
||||
- (void)unpause;
|
||||
|
||||
@end
|
||||
@ -1,16 +0,0 @@
|
||||
//
|
||||
// MVMCoreBlockOperation.h
|
||||
// MVMCore
|
||||
//
|
||||
// Created by Pfeil, Scott Robert on 5/3/18.
|
||||
// Copyright © 2018 myverizon. All rights reserved.
|
||||
//
|
||||
|
||||
#import <MVMCore/MVMCoreOperation.h>
|
||||
|
||||
@interface MVMCoreBlockOperation : MVMCoreOperation
|
||||
|
||||
// Start this operation with the block. This block needs to call mark as finished when finished.
|
||||
+ (nullable instancetype)blockOperationWithBlock:(nonnull void (^)(MVMCoreBlockOperation * _Nonnull operation))block;
|
||||
|
||||
@end
|
||||
@ -1,142 +0,0 @@
|
||||
//
|
||||
// MVMCoreCache.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by Scott Pfeil on 11/27/13.
|
||||
// Copyright (c) 2013 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
// Caches the json that comes from the server.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
//block returned when getting image
|
||||
//parameters are UIImage object for the image, NSData for gif images, UIImage object for the image, A BOOL to indicate if it is a fall back image.
|
||||
typedef void(^MVMCoreGetImageBlock)(UIImage * _Nullable, NSData * _Nullable, BOOL);
|
||||
|
||||
@interface MVMCoreCache : NSObject
|
||||
|
||||
// The static string cache. Stored on the device.
|
||||
@property (nullable, strong, nonatomic, readonly) NSDictionary *staticStringCache;
|
||||
@property (nonnull, strong, nonatomic) NSOperationQueue *completionQueue;
|
||||
|
||||
// Returns the shared instance of this singleton
|
||||
+ (nullable instancetype)sharedCache;
|
||||
|
||||
#pragma mark - Page and Module Handling
|
||||
|
||||
// Checks the set of pageTypes to be cached for the given pageType.
|
||||
- (BOOL)shouldCacheJSONWithPageType:(nonnull NSString *)pageType;
|
||||
|
||||
// Checks the set of modules to be cached for the given module
|
||||
- (BOOL)shouldCacheJSONWithModule:(nonnull NSString *)module;
|
||||
|
||||
// For pages external to the mobile first framework to be added to the list to not cache
|
||||
- (void)addPageTypesToNotCache:(nullable NSArray <NSString *>*)array;
|
||||
|
||||
// For modules external to the mobile first framework to be added to the list to not cache
|
||||
- (void)addModulesToNotCache:(nullable NSArray <NSString *>*)array;
|
||||
|
||||
#pragma mark - Simple Fetch
|
||||
|
||||
// Gets a json dictionary from the cache by pageType. Pass in the block that you want to run once the dictionary is received. This will be run on a background thread.
|
||||
- (void)fetchJSONForPageType:(nullable NSString *)pageType completionHandler:(nonnull void (^)(NSDictionary * _Nullable jsonDictionary))completionHandler;
|
||||
|
||||
// Gets a json dictionary from the cache by module. Pass in the block that you want to run once the dictionary is received. This will be run on a background thread.
|
||||
- (void)fetchJSONForModule:(nullable NSString *)module completionHandler:(nonnull void (^)(NSDictionary * _Nullable jsonDictionary))completionHandler;
|
||||
|
||||
// Gets a json dictionary from the cache with all the requested modules. Pass in the block that you want to run once the dictionary is received. This will be run on a background thread.
|
||||
- (void)fetchJSONForModules:(nullable NSArray *)modules completionHandler:(nonnull void (^)(NSDictionary * _Nullable jsonDictionary))completionHandler;
|
||||
|
||||
#pragma mark - Advanced Fetch
|
||||
|
||||
// Pass in the block that you want to run once the dictionary is received and which queue to run it on. Pass in if you'd like the current thread to wait.
|
||||
- (void)fetchJSONForPageType:(nullable NSString *)pageType queue:(nullable NSOperationQueue *)queue waitUntilFinished:(BOOL)waitUntilFinished completionHandler:(nonnull void (^)(NSDictionary * _Nullable jsonDictionary))completionHandler;
|
||||
|
||||
// Gets a json dictionary from the cache by module. Pass in the block that you want to run once the dictionary is received and which queue to run it on. Pass in if you'd like the current thread to wait.
|
||||
- (void)fetchJSONForModule:(nullable NSString *)module queue:(nullable NSOperationQueue *)queue waitUntilFinished:(BOOL)waitUntilFinished completionHandler:(nonnull void (^)(NSDictionary * _Nullable jsonDictionary))completionHandler;
|
||||
|
||||
// Gets a json dictionary from the cache with all the requested modules. Pass in the block that you want to run once the dictionary is received and which queue to run it on. Pass in if you'd like the current thread to wait.
|
||||
- (void)fetchJSONForModules:(nullable NSArray *)modules queue:(nullable NSOperationQueue *)queue waitUntilFinished:(BOOL)waitUntilFinished completionHandler:(nonnull void (^)(NSDictionary * _Nullable jsonDictionary))completionHandler;
|
||||
|
||||
#pragma mark - Simple Insertion
|
||||
|
||||
// Adds a json dictionary to the cache by pageType.
|
||||
- (void)addPageToCache:(nonnull NSDictionary *)jsonDictionary pageType:(nonnull NSString *)pageType;
|
||||
|
||||
// Adds a json dictionary to the cache by module.
|
||||
- (void)addModuleToCache:(nonnull NSDictionary *)jsonDictionary module:(nonnull NSString *)module;
|
||||
|
||||
// Adds a json dictionary to the cache by modules.
|
||||
- (void)addModulesToCache:(nonnull NSDictionary *)jsonDictionary;
|
||||
|
||||
#pragma mark - Advanced Insertion
|
||||
|
||||
// Adds a json dictionary to the cache by pageType. Pass in the block that you want to run once the dictionary is received and which queue to run it on. Pass in if you'd like the current thread to wait.
|
||||
- (void)addPageToCache:(nonnull NSDictionary *)jsonDictionary pageType:(nonnull NSString *)pageType queue:(nullable NSOperationQueue *)queue waitUntilFinished:(BOOL)waitUntilFinished completionBlock:(nullable void (^)(void))completionBlock;
|
||||
|
||||
// Adds a json dictionary to the cache by module. Pass in the block that you want to run once the dictionary is received and which queue to run it on. Pass in if you'd like the current thread to wait.
|
||||
- (void)addModuleToCache:(nonnull NSDictionary *)jsonDictionary module:(nonnull NSString *)module queue:(nullable NSOperationQueue *)queue waitUntilFinished:(BOOL)waitUntilFinished completionBlock:(nullable void (^)(void))completionBlock;
|
||||
|
||||
// Pass in a dictionary containing modules to store in the cache. Pass in the block that you want to run once the dictionary is received and which queue to run it on. Pass in if you'd like the current thread to wait.
|
||||
- (void)addModulesToCache:(nonnull NSDictionary *)jsonDictionary queue:(nullable NSOperationQueue *)queue waitUntilFinished:(BOOL)waitUntilFinished completionBlock:(nullable void (^)(void))completionBlock;
|
||||
|
||||
#pragma mark - Simple Deletion
|
||||
|
||||
// Removes a json dictionary from the cache by pageType.
|
||||
- (void)removeJSONForPageType:(nonnull NSString *)pageType;
|
||||
|
||||
// Removes a json dictionary from the cache by module.
|
||||
- (void)removeJSONForModule:(nonnull NSString *)module;
|
||||
|
||||
// Removes the json for modules.
|
||||
- (void)removeJSONForModules:(nonnull NSArray *)modules;
|
||||
|
||||
// Clears the page and module data.
|
||||
- (void)clearMFCache;
|
||||
|
||||
#pragma mark - Advanced Deletion
|
||||
|
||||
// Removes a json dictionary from the cache by pageType. Pass in the block that you want to run once the dictionary is received and which queue to run it on. Pass in if you'd like the current thread to wait.
|
||||
- (void)removeJSONForPageType:(nonnull NSString *)pageType queue:(nullable NSOperationQueue *)queue waitUntilFinished:(BOOL)waitUntilFinished completionBlock:(nullable void (^)(void))completionBlock;
|
||||
|
||||
// Removes a json dictionary from the cache by module. Pass in the block that you want to run once the dictionary is received and which queue to run it on.
|
||||
- (void)removeJSONForModule:(nonnull NSString *)module queue:(nullable NSOperationQueue *)queue waitUntilFinished:(BOOL)waitUntilFinished completionBlock:(nullable void (^)(void))completionBlock;
|
||||
|
||||
// Removes the json for modules. Pass in the block that you want to run once the dictionary is received and which queue to run it on.
|
||||
- (void)removeJSONForModules:(nonnull NSArray *)modules queue:(nullable NSOperationQueue *)queue waitUntilFinished:(BOOL)waitUntilFinished completionBlock:(nullable void (^)(void))completionBlock;
|
||||
|
||||
#pragma mark Image Functions
|
||||
|
||||
// Subclass to return the bundle to use
|
||||
- (nonnull NSBundle *)bundleToUseForImages;
|
||||
|
||||
// Checks if the image is in the cache. If not, will try to download or create the image.
|
||||
// Width is used for downloading from scene7.
|
||||
// Height is used for downloading from scene7.
|
||||
// Format is used for downloading from scene7
|
||||
// Most cases only need to provide the width. If both are provided and the aspect ratio is different from the images, it will center the image.
|
||||
// In the future, may need to use align for the shop flow.
|
||||
// localFallbackImageName: should be the name of a local file to use in case of failure to download.
|
||||
- (void)getImage:(nullable NSString *)pathOrName useWidth:(BOOL)useWidth widthForS7:(NSInteger)widthForS7 useHeight:(BOOL)useHeight heightForS7:(NSInteger)heightForS7 localFallbackImageName:(nullable NSString *)fallbackImageName completionHandler:(nonnull MVMCoreGetImageBlock)completionHandler;
|
||||
- (void)getImage:(nullable NSString *)pathOrName useWidth:(BOOL)useWidth widthForS7:(NSInteger)widthForS7 useHeight:(BOOL)useHeight heightForS7:(NSInteger)heightForS7 format:(nullable NSString *)format localFallbackImageName:(nullable NSString *)fallbackImageName completionHandler:(nonnull MVMCoreGetImageBlock)completionHandler;
|
||||
- (void)getGif:(nullable NSString *)pathOrName useWidth:(BOOL)useWidth widthForS7:(NSInteger)widthForS7 useHeight:(BOOL)useHeight heightForS7:(NSInteger)heightForS7 format:(nullable NSString *)format localFallbackImageName:(nullable NSString *)fallbackImageName completionHandler:(nonnull MVMCoreGetImageBlock)completionHandler;
|
||||
|
||||
// Gets a cropped version of the requested image. Similar to the method above, but you can specify the final rect
|
||||
- (void)getCroppedImage:(nullable NSString *)pathOrName useWidth:(BOOL)useWidth widthForS7:(NSInteger)widthForS7 useHeight:(BOOL)useHeight heightForS7:(NSInteger)heightForS7 finalRect:(CGRect)finalRect flipImage:(BOOL)flipImage localFallbackImageName:(nullable NSString *)fallbackImageName completionHandler:(nonnull MVMCoreGetImageBlock)completionHandler;
|
||||
|
||||
// Gets an image from the cache.
|
||||
- (nullable UIImage *)getCachedImageWithName:(nonnull NSString *)imageName;
|
||||
- (nullable NSData *)getCachedDataWithName:(nonnull NSString *)imageName;
|
||||
|
||||
// Adds the image to the cache
|
||||
- (void)addImageToCache:(nonnull UIImage *)image withName:(nonnull NSString *)imageName;
|
||||
- (void)addDataToCache:(nonnull NSData *)data withName:(nonnull NSString *)imageName;
|
||||
|
||||
// Removes image from cache if we need to update
|
||||
- (void)removeImageFromCache:(nonnull NSString *)imageName;
|
||||
|
||||
// clears the image cache
|
||||
- (void)clearImageCache;
|
||||
|
||||
@end
|
||||
@ -1,47 +0,0 @@
|
||||
//
|
||||
// MVMCoreConstants.h
|
||||
// MVMCore
|
||||
//
|
||||
// Created by Pfeil, Scott Robert on 11/14/17.
|
||||
// Copyright © 2017 myverizon. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <CoreGraphics/CoreGraphics.h>
|
||||
|
||||
typedef NS_ENUM(NSInteger, MVMAppContext) {
|
||||
MVMAppContextNone = 0,
|
||||
MVMAppContextMF,
|
||||
MVMAppContextMFPrepay,
|
||||
MVMAppContextContentTransfer
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSInteger, NavigationType) {
|
||||
NavigationTypePush = 0,
|
||||
NavigationTypeSet,
|
||||
NavigationTypeReplaceTop,
|
||||
NavigationTypeReplaceAfterRoot,
|
||||
NavigationTypeReplaceElsePush,
|
||||
NavigationTypePop,
|
||||
NavigationTypePopSpecific,
|
||||
NavigationTypePopTo,
|
||||
NavigationTypePopToRoot
|
||||
};
|
||||
|
||||
extern NSString * const ParameterMDN;
|
||||
|
||||
#pragma mark - URL MFConstants
|
||||
|
||||
// Server URLs
|
||||
extern NSString * const URLProdPostpayBase;
|
||||
extern NSString * const URLComponentNativeServer;
|
||||
extern NSString * const URLComponentPrepayNativeServer;
|
||||
extern NSString * const URLComponentKeepAlive;
|
||||
|
||||
#pragma mark - Notification Names
|
||||
|
||||
extern NSString * const NotificationResponseLoaded;
|
||||
extern NSString * const MVMCoreNotificationGoingToServer;
|
||||
|
||||
#pragma mark - Image Cache
|
||||
extern NSTimeInterval const ImageTimeOut;
|
||||
@ -1,21 +0,0 @@
|
||||
//
|
||||
// MVMCoreDismissViewControllerOperation.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by Scott Pfeil on 9/28/15.
|
||||
// Copyright © 2015 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
// Operation for dismissing an alert view controller. Needs to be added to the main queue
|
||||
|
||||
#import "MVMCoreOperation.h"
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface MVMCoreDismissViewControllerOperation : MVMCoreOperation
|
||||
|
||||
// Goes up the presentation chain to only dismiss the top presented.
|
||||
- (nullable instancetype)initAndDismissTopViewController:(nullable UIViewController *)viewController animated:(BOOL)animated;
|
||||
|
||||
// Dismiss the passed in view controller.
|
||||
- (nullable instancetype)initAndDismissViewController:(nullable UIViewController *)viewController animated:(BOOL)animated;
|
||||
|
||||
@end
|
||||
@ -1,24 +0,0 @@
|
||||
//
|
||||
// MVMCoreDispatchUtility.h
|
||||
// MVMCore
|
||||
//
|
||||
// Created by Pfeil, Scott Robert on 11/9/17.
|
||||
// Copyright © 2017 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface MVMCoreDispatchUtility : NSObject
|
||||
|
||||
// Ensures the block is performed on the main thread.
|
||||
+ (void)performBlockOnMainThread:(nonnull void (^)(void))block;
|
||||
+ (void)performSyncBlockOnMainThread:(nonnull void (^)(void))block;
|
||||
|
||||
// Ensures the block is performed in the background.
|
||||
+ (void)performBlockInBackground:(nonnull void (^)(void))block;
|
||||
+ (void)performSyncBlockInBackground:(nonnull void (^)(void))block;
|
||||
|
||||
/// Ensures the block is peformed on the same *labeled* dispatch queue. The queue *must* be previously initialized with a unique label.
|
||||
+ (void)performSyncBlock:(nonnull void (^)(void))block onQueue:(nonnull dispatch_queue_t)queue;
|
||||
|
||||
@end
|
||||
@ -1,43 +0,0 @@
|
||||
//
|
||||
// MVMCoreErrorConstants.h
|
||||
// MVMCore
|
||||
//
|
||||
// Created by Pfeil, Scott Robert on 11/13/17.
|
||||
// Copyright © 2017 myverizon. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
// Error Domains
|
||||
extern NSString * const ErrorDomainSystem;
|
||||
extern NSString * const ErrorDomainNative;
|
||||
extern NSString * const ErrorDomainServer;
|
||||
|
||||
// Native Error Codes (Add new ones to bottom, don't change order!)
|
||||
typedef NS_ENUM(NSInteger, ErrorCode) {
|
||||
ErrorCodeDefault = 1,
|
||||
ErrorCodeParsingJSON, //2
|
||||
ErrorCodeNoPageType, //3
|
||||
ErrorCodeInitViewController,//4
|
||||
ErrorCodeViewControllerProcessingJSON,//5
|
||||
ErrorCodeRequiredModuleNotPresent,//6
|
||||
ErrorCodeNativeTimeout,//7
|
||||
ErrorCodeLinkawayFailed,//8
|
||||
ErrorCodePopupFailed,//9
|
||||
ErrorCodeUnknownActionType,//10
|
||||
ErrorCodeEmptyField,//11
|
||||
ErrorCodeInputValidationFailure,//12
|
||||
ErrorCodeEmptyResponse,//13
|
||||
ErrorCodeStaticCacheFail,//14
|
||||
ErrorCodeServerFailSendTouchIDHash,//15
|
||||
ErrorCodeJSONNotDictionary,//16
|
||||
ErrorCodeNoStoryboardName,//17
|
||||
ErrorCodeNoStoryBoardIdentifier,//18
|
||||
ErrorCodeNoNibName,//19
|
||||
ErrorCodeNoModule,//20
|
||||
ErrorCodeInvalidSettingType,//21
|
||||
ErrorCodeServerFailSendFaceIDHash,//22
|
||||
ErrorCodeSSL,//23
|
||||
ErrorCodeNoViewControllerToPresentOn,//24
|
||||
ErrorCodeNoErrorPageSent //25
|
||||
};
|
||||
@ -1,65 +0,0 @@
|
||||
//
|
||||
// MVMCoreErrorObject.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by Scott Pfeil on 3/6/14.
|
||||
// Copyright (c) 2014 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
// An object that keeps track of error details.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface MVMCoreErrorObject : NSObject
|
||||
|
||||
// error information
|
||||
@property (nullable, strong, nonatomic) NSString *title;
|
||||
@property (nullable, strong, nonatomic) NSString *messageToDisplay;
|
||||
@property (nullable, strong, nonatomic) NSString *messageToLog;
|
||||
@property (nullable, strong, nonatomic) NSString *domain;
|
||||
@property (nullable, strong, nonatomic) NSString *location;
|
||||
@property (nullable, strong, nonatomic) NSDate *date;
|
||||
@property (nullable, strong, nonatomic) NSString *systemDomain;
|
||||
@property (nonatomic) NSInteger code;
|
||||
@property (nonatomic) UIApplicationState applicationState;
|
||||
|
||||
// For the crash log.
|
||||
@property (nullable, strong, nonatomic) NSDictionary *crashLog;
|
||||
|
||||
// A flag for if the error is silent or not (displayed to the user)
|
||||
@property (nonatomic) BOOL silentError;
|
||||
|
||||
// A flag for if the error should be logged. (Used in the standardrequestprotocol flow).
|
||||
@property (nonatomic) BOOL logError;
|
||||
|
||||
// A flag for keeping track if this is an error screen error.
|
||||
@property (nonatomic) BOOL errorScreenError;
|
||||
@property (nonatomic) BOOL nativeDrivenErrorScreen;
|
||||
// For SSL Pinning
|
||||
// A flag for keeping track if this is an SSL error.
|
||||
@property (nonatomic) BOOL sslError;
|
||||
|
||||
// Creates an object with the given error info.
|
||||
- (nullable instancetype)initWithTitle:(nullable NSString *)title message:(nullable NSString *)message code:(NSInteger)code domain:(nullable NSString *)domain location:(nullable NSString *)location;
|
||||
- (nullable instancetype)initWithTitle:(nullable NSString *)title messageToLog:(nullable NSString *)messageToLog code:(NSInteger)code domain:(nullable NSString *)domain location:(nullable NSString *)location;
|
||||
- (nullable instancetype)initWithTitle:(nullable NSString *)title message:(nullable NSString *)message messageToLog:(nullable NSString *)messageToLog code:(NSInteger)code domain:(nullable NSString *)domain location:(nullable NSString *)location;
|
||||
|
||||
// Creates and returns an error object for the load object. May be nil.
|
||||
+ (nullable instancetype)createErrorObjectForErrorInfo:(nullable NSDictionary *)errorInfo location:(nullable NSString *)location;
|
||||
|
||||
// Creates and returns an error object for the NSError. May be nil.
|
||||
+ (nullable instancetype)createErrorObjectForNSError:(nonnull NSError *)error location:(nullable NSString *)location;
|
||||
|
||||
// Initializes the error object with a given crash log.
|
||||
- (nullable instancetype)initWithCrashLog:(nullable NSDictionary *)crashLog;
|
||||
|
||||
// Returns the error code as readable string and appends a signifier for domain.
|
||||
- (nonnull NSString *)stringErrorCode;
|
||||
|
||||
// Returns the error code as readable string and appends a signifier for domain.
|
||||
+ (nonnull NSString *)stringErrorCode:(NSInteger)code domain:(nonnull NSString *)domain;
|
||||
|
||||
// Returns the state of the application when the error occurred.
|
||||
- (nonnull NSString *)stringApplicationState;
|
||||
|
||||
@end
|
||||
@ -1,31 +0,0 @@
|
||||
//
|
||||
// MVMCoreGetterUtility.h
|
||||
// MVMCore
|
||||
//
|
||||
// Created by Pfeil, Scott Robert on 11/13/17.
|
||||
// Copyright © 2017 myverizon. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#define fequal(a,b) (fabs((a) - (b)) < FLT_EPSILON)
|
||||
|
||||
@interface MVMCoreGetterUtility : NSObject
|
||||
|
||||
// The bundle for this framework
|
||||
+ (nullable NSBundle *)bundleForMVMCore;
|
||||
|
||||
// Returns the hardcoded string from the string file.
|
||||
+ (nullable NSString *)hardcodedStringWithKey:(nonnull NSString *)key;
|
||||
|
||||
// Returns true if the user's language is Spanish
|
||||
+ (BOOL)userPrefersSpanish;
|
||||
|
||||
// Returns a UIColor
|
||||
+ (nonnull UIColor *)getColorForHexString:(nonnull NSString *)hexString;
|
||||
|
||||
// Returns if the device is an ipad
|
||||
+ (BOOL)isOnIPad;
|
||||
|
||||
@end
|
||||
@ -1,38 +0,0 @@
|
||||
//
|
||||
// MVMCGlobalLoadProtocol.h
|
||||
// MVMCore
|
||||
//
|
||||
// Created by Pfeil, Scott Robert on 11/21/17.
|
||||
// Copyright © 2017 myverizon. All rights reserved.
|
||||
//
|
||||
|
||||
#import <MVMCore/MVMCoreErrorObject.h>
|
||||
#import <MVMCore/MVMCoreRequestParameters.h>
|
||||
#import <MVMCore/MVMCoreViewControllerProtocol.h>
|
||||
#import <MVMCore/MVMCoreLoadObject.h>
|
||||
#import <MVMCore/MVMCoreViewManagerProtocol.h>
|
||||
|
||||
@protocol MVMCoreGlobalLoadProtocol <NSObject>
|
||||
|
||||
@optional
|
||||
|
||||
// Provides the desired error screen for the native error. Called on the main thread. If set, any native errors or NSURLErrorDomain errors will use a native screen.
|
||||
- (nullable UIViewController <MVMCoreViewControllerProtocol> *)getNativeScreenForRequestError:(nonnull MVMCoreErrorObject *)errorObject requestObject:(nonnull MVMCoreRequestParameters *)requestObject;
|
||||
|
||||
/* Can choose to handle global error scenarios here... This will happen for every request so only put things in here that aren't controller specific. Must call completion handler.
|
||||
@param completionHandler must be called when finished handling errors. Pass if we should continue or not, and any error object that you want to be handled. */
|
||||
- (void)handleGlobalErrorsForLoadObject:(nonnull MVMCoreLoadObject *)loadObject completionHandler:(nonnull void (^)(BOOL shouldContinueLoad, MVMCoreErrorObject * _Nullable error))completionHandler;
|
||||
|
||||
// Can overwrite this to provide any view controllers that may be cached for the provided load object page type. Allows for using an old screen instead of creating a new screen. This function should not be used to create a screen.
|
||||
- (nullable UIViewController <MVMCoreViewControllerProtocol>*)getCachedViewControllerForLoadObject:(nonnull MVMCoreLoadObject *)loadObject;
|
||||
|
||||
// Can overwrite this function to provide a view manager with the embedded view controller instead of just the view controller. For example, load a custom tab bar with this page as the first tab.
|
||||
- (nullable UIViewController <MVMCoreViewManagerProtocol,MVMCoreViewControllerProtocol> *)getViewManagerWithViewController:(nonnull UIViewController <MVMCoreViewControllerProtocol> *)viewController loadObject:(nullable MVMCoreLoadObject *)loadObject;
|
||||
|
||||
// Can overwrite to set the request time out time.
|
||||
- (NSTimeInterval)timeOutIntervalForRequest:(nullable MVMCoreRequestParameters *)request;
|
||||
|
||||
// Can return an error object.
|
||||
- (nonnull MVMCoreErrorObject *)createErrorObjectForRequestNSError:(nonnull NSError *)error forRequest:(nonnull NSURLRequest *)request location:(nullable NSString *)locationForError;
|
||||
|
||||
@end
|
||||
@ -1,21 +0,0 @@
|
||||
//
|
||||
// MVMCoreGlobalTopAlertDelegateProtocol.h
|
||||
// MVMCore
|
||||
//
|
||||
// Created by Pfeil, Scott Robert on 1/2/18.
|
||||
// Copyright © 2018 myverizon. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <MVMCore/MVMCoreTopAlertViewProtocol.h>
|
||||
@class MVMCoreTopAlertObject;
|
||||
|
||||
@protocol MVMCoreGlobalTopAlertDelegateProtocol <NSObject>
|
||||
|
||||
- (NSOperationQueuePriority)priorityForTopAlertByObject:(nonnull MVMCoreTopAlertObject *)object;
|
||||
|
||||
@optional
|
||||
|
||||
- (nonnull UIView <MVMCoreTopAlertViewProtocol>*)getTopAlertView;
|
||||
|
||||
@end
|
||||
@ -1,17 +0,0 @@
|
||||
//
|
||||
// MVMCoreHardcodedStringsConstants.h
|
||||
// MVMCore
|
||||
//
|
||||
// Created by Pfeil, Scott Robert on 11/13/17.
|
||||
// Copyright © 2017 myverizon. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
extern NSString * const HardcodedErrorTitle;
|
||||
extern NSString * const HardcodedRestart;
|
||||
extern NSString * const HardcodedOK;
|
||||
|
||||
extern NSString * const HardcodedErrorCritical;
|
||||
extern NSString * const HardcodedErrorUnableToProcess;
|
||||
|
||||
@ -1,71 +0,0 @@
|
||||
//
|
||||
// MVMCoreJSONConstants.h
|
||||
// MVMCore
|
||||
//
|
||||
// Created by Pfeil, Scott Robert on 11/13/17.
|
||||
// Copyright © 2017 myverizon. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
extern NSString * const KeyResponseInfo;
|
||||
extern NSString * const KeyCode;
|
||||
extern NSString * const KeyUserMessage;
|
||||
extern NSString * const KeyTopMessage;
|
||||
extern NSString * const KeyCloseButton;
|
||||
extern NSString * const KeyMessageStyle;
|
||||
extern NSString * const KeyErrorHeading;
|
||||
|
||||
extern NSString * const KeyPage;
|
||||
extern NSString * const KeyPageType;
|
||||
extern NSString * const KeyModuleMap;
|
||||
extern NSString * const KeyModuleList;
|
||||
extern NSString * const KeyPageMap;
|
||||
extern NSString * const KeySystemParameters;
|
||||
extern NSString * const KeyButtonMap;
|
||||
extern NSString * const KeyOpenSupport;
|
||||
|
||||
extern NSString * const KeyLinks;
|
||||
extern NSString * const KeyTitle;
|
||||
extern NSString * const KeyMessage;
|
||||
extern NSString * const KeyActionTypeRestart;
|
||||
extern NSString * const KeyActionTypeBack;
|
||||
extern NSString * const KeyActionTypeCall;
|
||||
extern NSString * const KeyActionTypePreviousSubmit;
|
||||
extern NSString * const KeyActionTypePopup;
|
||||
extern NSString * const KeyActionTypeCancel;
|
||||
extern NSString * const KeyActionTypeRedirect;
|
||||
extern NSString * const KeyActionTypeTopAlert;
|
||||
extern NSString * const KeyActionTypeSettings;
|
||||
extern NSString * const KeyActionTypeCollapseNotification;
|
||||
extern NSString * const KeyActionInformation;
|
||||
extern NSString * const KeyLinkAwayAppURL;
|
||||
extern NSString * const KeyLinkAwayURL;
|
||||
extern NSString * const KeyCallNumber;
|
||||
extern NSString * const KeyPresentationStyle;
|
||||
extern NSString * const KeyExtraParameters;
|
||||
extern NSString * const KeyContextRoot;
|
||||
|
||||
extern NSString * const KeyType;
|
||||
extern NSString * const KeyMVMRC;
|
||||
|
||||
#pragma mark - JSON Values
|
||||
|
||||
// Server driven response type
|
||||
extern NSString * const ValueTypeSuccess;
|
||||
extern NSString * const ValueTypeError;
|
||||
extern NSString * const ValueTypeFieldErrors;
|
||||
extern NSString * const ValueTypeErrorScreen;
|
||||
extern NSString * const ValueTypeRedirect;
|
||||
|
||||
// Server driven message style.
|
||||
extern NSString * const ValueMessageStylePopup;
|
||||
extern NSString * const ValueMessageStyleTop;
|
||||
extern NSString * const ValueMessageStyleTopPersistent;
|
||||
|
||||
// Server driven presentation style
|
||||
extern NSString * const ValuePresentationStyleModal;
|
||||
extern NSString * const ValuePresentationStyleRoot;
|
||||
extern NSString * const ValuePresentationStyleReplace;
|
||||
extern NSString * const ValuePresentationStylePush;
|
||||
extern NSString * const ValuePresentationStylePopToPage;
|
||||
@ -1,64 +0,0 @@
|
||||
//
|
||||
// MVMCoreLoadDelegateProtocol.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by Scott Pfeil on 11/26/13.
|
||||
// Copyright (c) 2013 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
// The standard post request protocol
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <MVMCore/MVMCoreViewControllerProtocol.h>
|
||||
@class MVMCoreRequestParameters;
|
||||
@class MVMCoreErrorObject;
|
||||
@class MVMCoreAlertObject;
|
||||
@class MVMCoreLoadObject;
|
||||
|
||||
@protocol MVMCoreLoadDelegateProtocol
|
||||
|
||||
@optional
|
||||
|
||||
/** Use this function if you want to handle any specific errors in a special manner. You can perform any logic needed here. Default behavior is to present the error.
|
||||
* @param errorObject The error object
|
||||
* @param loadObject Contains load data.
|
||||
* @return If we should continue the loading process or end it.
|
||||
* Details: Should handle any view controller specific loading errors. Easy to subclass. Called in checkForErrors */
|
||||
- (BOOL)checkForDelegateSpecificErrors:(nullable MVMCoreErrorObject *)errorObject loadObject:(nonnull MVMCoreLoadObject *)loadObject completionHandler:(nonnull void (^)(BOOL shouldContinueLoad, MVMCoreLoadObject * _Nullable loadObject, MVMCoreErrorObject * _Nullable error))completionHandler;
|
||||
|
||||
/** Notifies the delegate that an error page will be loaded and asks if we should load it.
|
||||
* @param loadObject Contains load data.
|
||||
* @param error Contains any error.
|
||||
* @return TRUE if the calling process should continue. */
|
||||
- (BOOL)shouldContinueToErrorPage:(nonnull MVMCoreLoadObject *)loadObject error:(nullable MVMCoreErrorObject *)error;
|
||||
|
||||
/** Notifies the delegate that a module failed to load.
|
||||
* @param module The name of the module.
|
||||
* @param loadObject The load object containing all of the information.
|
||||
* @param error The error object passed in will be set in the case of an error.
|
||||
* @return True if the calling process should continue. */
|
||||
- (BOOL)handleModuleError:(nonnull NSString *)module loadObject:(nonnull MVMCoreLoadObject *)loadObject error:(nonnull MVMCoreErrorObject *)error;
|
||||
|
||||
/** Get the alert object whose data will be presented. Overwrite this to alter how you want the alert to show.
|
||||
* @param loadObject The load object.
|
||||
* @param errorObject An error object if there was an error.
|
||||
* @return Returns the alert object.
|
||||
* Details: Gets the alert that will display to the screen. Easier to subclass here to avoid subclassing the displaying logic. */
|
||||
- (nullable MVMCoreAlertObject *)alertObjectToShow:(nonnull MVMCoreLoadObject *)loadObject error:(nullable MVMCoreErrorObject *)errorObject;
|
||||
|
||||
/** Allows the delegate to handle any field errors.
|
||||
* @param fieldErrors The field errors.
|
||||
* @param loadObject The load object.*/
|
||||
- (void)handleFieldErrors:(nullable NSArray *)fieldErrors loadObject:(nonnull MVMCoreLoadObject *)loadObject;
|
||||
|
||||
/** Called when the load is all finished. Use this to perform any cleanup.
|
||||
* @param loadObject The load object.
|
||||
* @param loadedViewController If a view controller was loaded or not.
|
||||
* @param error The error object.
|
||||
* Details: Only sends an errorObject if there is an error. */
|
||||
- (void)loadFinished:(nullable MVMCoreLoadObject *)loadObject loadedViewController:(nullable UIViewController <MVMCoreViewControllerProtocol> *)loadedViewController error:(nullable MVMCoreErrorObject *)error;
|
||||
|
||||
// Called when the load is cancelled.
|
||||
- (void)loadCancelled:(nullable MVMCoreLoadObject *)loadObject;
|
||||
|
||||
@end
|
||||
|
||||
@ -1,74 +0,0 @@
|
||||
//
|
||||
// MVMCoreLoadHandler.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by ScottMVMCoreErrorObject.h Pfeil on 11/12/15.
|
||||
// Copyright © 2015 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
// Handles loading data
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <MVMCore/MVMCoreLoadDelegateProtocol.h>
|
||||
#import <MVMCore/MVMCorePresentationDelegateProtocol.h>
|
||||
#import <MVMCore/MVMCoreActionDelegateProtocol.h>
|
||||
#import <MVMCore/MVMCoreViewControllerProtocol.h>
|
||||
|
||||
@class MVMCoreRequestParameters;
|
||||
@class MVMCoreErrorObject;
|
||||
@class MVMCoreLoadObject;
|
||||
@class MVMCoreLoadRequestOperation;
|
||||
@class DelegateObject;
|
||||
|
||||
@interface MVMCoreLoadHandler : NSObject
|
||||
|
||||
// Returns the shared instance of this singleton
|
||||
+ (nullable instancetype)sharedGlobal;
|
||||
|
||||
// Adds an additional externally managed queue to the list of all loading queues. This allows for cross queue dependency management.
|
||||
- (void)registerLoadQueue:(NSOperationQueue *_Nonnull)queue;
|
||||
|
||||
// Returns the error location for the given load object. Important for proper logging.
|
||||
- (nonnull NSString *)errorLocationForRequest:(nonnull MVMCoreLoadObject *)loadObject;
|
||||
|
||||
// Returns the error location for the given requesting object and page type and modules. Important for proper logging.
|
||||
- (nonnull NSString *)errorLocationForRequest:(nonnull id)requestingObject pageType:(nonnull NSString *)pageType modules:(nonnull NSString *)modules;
|
||||
|
||||
#pragma mark - Request Functions.
|
||||
|
||||
// Creates a request object with the given parameters.
|
||||
- (nullable NSURLRequest *)requestWithParameters:(nonnull MVMCoreRequestParameters *)requestParameters error:(MVMCoreErrorObject *_Nonnull *_Nonnull)error;
|
||||
|
||||
// Sends a given request to the server. When it is finished, it calls request finished, passing along the json object or nil if there is an error.
|
||||
- (nullable NSURLSessionTask *)sendRequest:(nonnull MVMCoreRequestParameters *)requestParameters locationForError:(nonnull NSString *)locationForError requestFinished:(nullable void (^)(id _Nullable jsonObject, MVMCoreErrorObject * _Nullable error))requestFinished;
|
||||
|
||||
#pragma mark - Loading Functions
|
||||
|
||||
// Loads a blocking request with the passed in parameters and data for the next page. Pass in the data to handle certain functions.
|
||||
- (nonnull MVMCoreLoadRequestOperation *)loadRequest:(nonnull MVMCoreRequestParameters *)requestParameters dataForPage:(nullable NSDictionary *)dataForPage delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
// Loads a background request with the passed in parameters and data for the next page. Pass in the data to handle certain functions.
|
||||
- (nonnull MVMCoreLoadRequestOperation *)loadBackgroundRequest:(nonnull MVMCoreRequestParameters *)requestParameters dataForPage:(nullable NSDictionary *)dataForPage delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
// Loads a blocking request with the passed in load object and data for the next page.
|
||||
- (nonnull MVMCoreLoadRequestOperation *)loadObject:(nonnull MVMCoreLoadObject *)loadObject;
|
||||
|
||||
// Cancels all of the current loads.
|
||||
- (void)cancelAllLoads;
|
||||
|
||||
#pragma mark - Standard Delegate Functions
|
||||
|
||||
// By default, if error code is not zero, returns not to continue.
|
||||
+ (BOOL)defaultCheckForSpecificErrors:(nullable MVMCoreErrorObject *)errorObject loadObject:(nonnull MVMCoreLoadObject *)loadObject;
|
||||
|
||||
// By default, returns continue loading and decides not to throw an error.
|
||||
+ (BOOL)defaultHandleModuleError:(nonnull NSString *)module loadObject:(nonnull MVMCoreLoadObject *)loadObject error:(nonnull MVMCoreErrorObject *)error;
|
||||
|
||||
#pragma mark - Deprecated
|
||||
|
||||
// Loads a blocking request with the passed in parameters and data for the next page. Pass in the data to handle certain functions.
|
||||
- (nonnull MVMCoreLoadRequestOperation *)loadRequest:(nonnull MVMCoreRequestParameters *)requestParameters dataForPage:(nullable NSDictionary *)dataForPage delegate:(nullable NSObject<MVMCoreLoadDelegateProtocol,MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
||||
|
||||
// Loads a background request with the passed in parameters and data for the next page. Pass in the data to handle certain functions.
|
||||
- (nonnull MVMCoreLoadRequestOperation *)loadBackgroundRequest:(nonnull MVMCoreRequestParameters *)requestParameters dataForPage:(nullable NSDictionary *)dataForPage delegate:(nullable NSObject<MVMCoreLoadDelegateProtocol,MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
||||
|
||||
@end
|
||||
@ -1,75 +0,0 @@
|
||||
//
|
||||
// MVMCoreLoadObject.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by Scott Pfeil on 11/16/15.
|
||||
// Copyright © 2015 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
// An object that holds load data
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <MVMCore/MVMCoreLoadDelegateProtocol.h>
|
||||
#import <MVMCore/MVMCorePresentationDelegateProtocol.h>
|
||||
#import <MVMCore/MVMCoreActionDelegateProtocol.h>
|
||||
|
||||
@class MVMCoreLoadRequestOperation;
|
||||
@class MVMCoreRequestParameters;
|
||||
@class DelegateObject;
|
||||
|
||||
@interface MVMCoreLoadObject : NSObject
|
||||
|
||||
// The page that was loaded.
|
||||
@property (nullable, strong, nonatomic) NSString *pageType;
|
||||
|
||||
// The data for hte page that was loaded
|
||||
@property (nullable, strong, nonatomic) NSDictionary *pageJSON;
|
||||
|
||||
// Contains the button map
|
||||
@property (nullable, nonatomic, strong, readonly) NSDictionary *buttonMap;
|
||||
|
||||
// the modules that are needed
|
||||
@property (nullable, strong, nonatomic) NSDictionary *modulesJSON;
|
||||
|
||||
// the response info
|
||||
@property (nullable, strong, nonatomic) NSDictionary *responseInfoMap;
|
||||
|
||||
// any additional parameters
|
||||
@property (nullable, strong, nonatomic) NSDictionary *systemParametersJSON;
|
||||
|
||||
// The request
|
||||
@property (nullable, strong, nonatomic) MVMCoreRequestParameters *requestParameters;
|
||||
|
||||
// any additional data for the page
|
||||
@property (nullable, strong, nonatomic) NSDictionary *dataForPage;
|
||||
|
||||
// The load delegate
|
||||
@property (nullable, weak, nonatomic) NSObject <MVMCoreLoadDelegateProtocol,MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol> *delegate __deprecated;
|
||||
@property (nullable, strong, nonatomic) DelegateObject *delegateObject;
|
||||
|
||||
// The operation that is loading.
|
||||
@property (nullable, weak, nonatomic) MVMCoreLoadRequestOperation *operation;
|
||||
|
||||
// Flags for if we loaded from the cache.
|
||||
@property (nonatomic) BOOL pageDataFromCache;
|
||||
@property (nonatomic) BOOL moduleDataFromCache;
|
||||
|
||||
- (nullable instancetype)initWithPageJSON:(nullable NSDictionary *)pageJSON modulesJSON:(nullable NSDictionary *)modulesJSON requestParameters:(nullable MVMCoreRequestParameters *)requestParameters dataForPage:(nullable NSDictionary *)dataForPage delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
- (nullable instancetype)initWithRequestParameters:(nullable MVMCoreRequestParameters *)requestParameters dataForPage:(nullable NSDictionary *)dataForPage delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
- (nullable instancetype)initWithDelegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
- (nullable instancetype)initWithPageJSON:(nullable NSDictionary *)pageJSON errorObject:(nullable MVMCoreErrorObject *)errorObject;
|
||||
|
||||
// Returns whether the load will extend the app session timer based on the response provided by the server.
|
||||
- (BOOL)extendsAppSession;
|
||||
|
||||
#pragma mark - Deprecated
|
||||
|
||||
- (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 __deprecated;
|
||||
|
||||
- (nullable instancetype)initWithRequestParameters:(nullable MVMCoreRequestParameters *)requestParameters dataForPage:(nullable NSDictionary *)dataForPage delegate:(nullable NSObject<MVMCoreLoadDelegateProtocol,MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
||||
|
||||
- (nullable instancetype)initWithDelegate:(nullable NSObject<MVMCoreLoadDelegateProtocol,MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate __deprecated;
|
||||
|
||||
@end
|
||||
@ -1,105 +0,0 @@
|
||||
//
|
||||
// MVMCoreLoadRequestOperation.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by Scott Pfeil on 11/11/15.
|
||||
// Copyright © 2015 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
// The meat and potatos. Handles the load protocol. Should NOT be called on the main queue.
|
||||
|
||||
#import <MVMCore/MVMCoreOperation.h>
|
||||
#import <MVMCore/MVMCoreLoadDelegateProtocol.h>
|
||||
#import <MVMCore/MVMCorePresentationDelegateProtocol.h>
|
||||
#import <MVMCore/MVMCoreActionDelegateProtocol.h>
|
||||
|
||||
@class MVMCoreRequestParameters;
|
||||
@class MVMCoreLoadObject;
|
||||
@class DelegateObject;
|
||||
|
||||
@interface MVMCoreLoadRequestOperation : MVMCoreOperation <MVMCorePresentationDelegateProtocol>
|
||||
|
||||
@property (nullable, strong, nonatomic) MVMCoreRequestParameters *requestParameters;
|
||||
@property (nullable, strong, nonatomic) MVMCoreLoadObject *loadObject;
|
||||
@property (nullable, strong, nonatomic) NSDictionary *dataForPage;
|
||||
@property (nullable, strong, nonatomic) NSObject <MVMCoreLoadDelegateProtocol,MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol> *delegate;// __deprecated;
|
||||
@property (nullable, strong, nonatomic) DelegateObject *delegateObject;
|
||||
@property (nonatomic) BOOL backgroundLoad;
|
||||
@property (nonatomic, getter=areDependenciesAdded) BOOL dependenciesAdded;
|
||||
|
||||
// Initializes the operation with the request parameters object, data for page, and mvm view controller to handle the loading with.
|
||||
- (nullable instancetype)initWithRequestParameters:(nullable MVMCoreRequestParameters *)requestParameters dataForPage:(nullable NSDictionary *)dataForPage delegateObject:(nullable DelegateObject *)delegateObject backgroundLoad:(BOOL)backgroundLoad;
|
||||
|
||||
// Initializes the operation with the load object, data for page, and mvm view controller to handle the loading with. Can be used for loading a screen without going to the cache or server.
|
||||
- (nullable instancetype)initWithLoadObject:(nullable MVMCoreLoadObject *)loadObject backgroundLoad:(BOOL)backgroundLoad;
|
||||
|
||||
/* Checks the cache for the data and calls the completion handler with any found data.
|
||||
* @param completionHandler The block that gets called with any fetched data. */
|
||||
+ (void)checkCacheForDataForRequest:(nonnull MVMCoreRequestParameters *)requestParameters completionHandler:(nonnull void (^)(NSDictionary * _Nullable pageFromCache, NSDictionary * _Nullable modulesFromCache))completionHandler;
|
||||
|
||||
/** Sends the request to the server with the given parameters.
|
||||
* @param loadObject The load object for this operation. Should contain any data loaded from the cache.
|
||||
* @param completionHandler gets called with the json assuming there were no errors. Any errors will be handled and completion handler will not be called. */
|
||||
+ (void)sendRequest:(nonnull MVMCoreRequestParameters *)requestParameters loadObject:(nonnull MVMCoreLoadObject *)loadObject completionHandler:(nonnull void (^)(NSDictionary * _Nullable json))completionHandler;
|
||||
|
||||
/* A helper function. If we shouldn't continue, finish or abort with error. If we should continue, call the continue block. Error is not handled if we continue.
|
||||
* @param errorBlock The block that gets called when we shouldn't continue for any reason.
|
||||
* @param completionHandler The block that gets when we should continue. */
|
||||
+ (void)handleShouldContinue:(BOOL)shouldContinue error:(nullable MVMCoreErrorObject *)error loadObject:(nullable MVMCoreLoadObject *)loadObject errorBlock:(nullable void (^)(void))errorBlock continueBlock:(nonnull void (^)(void))continueBlock;
|
||||
|
||||
// Processes the json retrieved from the server. Will cache the json and process it.
|
||||
+ (void)processJSONFromServer:(nonnull NSDictionary *)jsonDictionary loadObject:(nonnull MVMCoreLoadObject *)loadObject completionHandler:(nonnull void (^)(MVMCoreLoadObject * _Nonnull loadObject, MVMCoreErrorObject * _Nullable error))completionHandler;
|
||||
|
||||
/** Handles the load object now that the json is retrieved. Loads a page when asked and finishes up the load.
|
||||
* @param loadObject The load data from the cache or server.
|
||||
* @param error A possible error that was caught and needs to be passed to load finished. It has already been handled.*/
|
||||
+ (void)handleLoadObject:(nonnull MVMCoreLoadObject *)loadObject error:(nullable MVMCoreErrorObject *)error;
|
||||
|
||||
/** Checks the json for any errors. First, checks the response info for standard errors. Then, allows the core delegate to handle global errors. Then, allows the delegate to handle controller specific errors.
|
||||
* @param loadObject The load data from the cache or server.
|
||||
* @param completionHandler The completion handler to load once finished. Returns if we should continue loading or not. */
|
||||
+ (void)checkForErrorsInJSONForLoadObject:(nonnull MVMCoreLoadObject *)loadObject completionHandler:(nonnull void (^)(BOOL shouldContinueLoad, MVMCoreLoadObject * _Nullable loadObject, MVMCoreErrorObject * _Nullable error))completionHandler;
|
||||
|
||||
/** Caches the modules.
|
||||
* @param modules a dictionary of modules.
|
||||
* @param loadObject The load data from the cache or server.
|
||||
* @param error The error object passed in will be set in the case of an error.
|
||||
* @return True if the calling process should continue. */
|
||||
+ (BOOL)cacheModules:(nullable NSDictionary *)modules loadObject:(nonnull MVMCoreLoadObject *)loadObject error:(MVMCoreErrorObject *_Nullable *_Nullable)error;
|
||||
|
||||
/** Caches the additional pages.
|
||||
* @param pages a dictionary of pages.
|
||||
* @param loadObject The load data from the cache or server.
|
||||
* @param error The error object passed in will be set in the case of an error.
|
||||
* @return True if the calling process should continue. */
|
||||
+ (BOOL)cachePages:(nullable NSDictionary *)pages loadObject:(nonnull MVMCoreLoadObject *)loadObject error:(MVMCoreErrorObject *_Nullable *_Nullable)error;
|
||||
|
||||
/** Creates the view controller based on the load object passed in.
|
||||
* @param loadObject The load data from the cache or server.
|
||||
* @param completionHandler The completion handler to load once finished. Returns any loaded view controller and the load.*/
|
||||
+ (void)createViewControllerWithLoadObject:(nonnull MVMCoreLoadObject *)loadObject completionHandler:(nonnull void (^)(UIViewController <MVMCoreViewControllerProtocol> * _Nullable viewController, MVMCoreLoadObject *_Nonnull loadObject))completionHandler;
|
||||
|
||||
// Displays the view controller to the screen.
|
||||
+ (void)displayViewController:(nonnull UIViewController <MVMCoreViewControllerProtocol> *)viewController loadObject:(nullable MVMCoreLoadObject *)loadObject error:(nullable MVMCoreErrorObject *)error;
|
||||
|
||||
// Handles the error based on the error object passed in. May log and/or display the error.
|
||||
+ (void)handleError:(nonnull MVMCoreErrorObject *)error loadObject:(nonnull MVMCoreLoadObject *)loadObject showAlertForErrorIfApplicable:(BOOL)showAlertForErrorIfApplicable;
|
||||
|
||||
// Shows the appropriate alert tyle for the given response info and/or error.
|
||||
+ (void)createAndShowAlertForLoadObject:(nullable MVMCoreLoadObject *)loadObject error:(nullable MVMCoreErrorObject *)error delegateObject:(nullable DelegateObject *)delegateObject;
|
||||
|
||||
/** Called when the load was finished due to an error. Handles the error and ends the load.
|
||||
* @param error The error that occured. May be logged depending.
|
||||
* @param loadObject The load data for the error. **/
|
||||
+ (void)loadAbortedWithError:(nonnull MVMCoreErrorObject *)error loadObject:(nonnull MVMCoreLoadObject *)loadObject;
|
||||
|
||||
/** Called when the load is finished. Ends the load. Lets the delegate know that the load finished and passes along any error that may have caused an abort.
|
||||
* @param errorObject An error if one caused an abort.
|
||||
* @param loadedViewController If a view controller was loaded or not, it will be passed here.
|
||||
* @param loadObject The load data **/
|
||||
+ (void)loadFinished:(nonnull MVMCoreLoadObject *)loadObject loadedViewController:(nullable UIViewController <MVMCoreViewControllerProtocol> *)loadedViewController errorObject:(nullable MVMCoreErrorObject *)errorObject;
|
||||
|
||||
#pragma mark - Deprecated
|
||||
|
||||
- (nullable instancetype)initWithRequestParameters:(nullable MVMCoreRequestParameters *)requestParameters dataForPage:(nullable NSDictionary *)dataForPage delegate:(nullable NSObject<MVMCoreLoadDelegateProtocol,MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate backgroundLoad:(BOOL)backgroundLoad __deprecated;
|
||||
|
||||
@end
|
||||
@ -1,25 +0,0 @@
|
||||
//
|
||||
// MVMCoreLoadingOverlayDelegateProtocol.h
|
||||
// MVMCore
|
||||
//
|
||||
// Created by Pfeil, Scott Robert on 11/27/17.
|
||||
// Copyright © 2017 myverizon. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <MVMCore/MVMCoreLoadingViewControllerProtocol.h>
|
||||
|
||||
@protocol MVMCoreLoadingOverlayDelegateProtocol <NSObject>
|
||||
|
||||
@optional
|
||||
|
||||
// Loading will be beginning
|
||||
- (void)beginningLoading;
|
||||
|
||||
// Loading is finished
|
||||
- (void)finishedLoading;
|
||||
|
||||
// Provides the screen to use for loading.
|
||||
- (nonnull UIViewController <MVMCoreLoadingViewControllerProtocol> *)getLoadingViewController;
|
||||
|
||||
@end
|
||||
@ -1,29 +0,0 @@
|
||||
//
|
||||
// MVMCoreLoadingOverlayHandler.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by Scott Pfeil on 3/10/14.
|
||||
// Copyright (c) 2014 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
// A singleton for handling a loading screen. Ensures there is only one on the screen at any given time.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface MVMCoreLoadingOverlayHandler : NSObject
|
||||
|
||||
// Returns the shared instance of this singleton
|
||||
+ (nullable instancetype)sharedLoadingOverlay;
|
||||
|
||||
// Starts Loading. Every start loading call must be terminated with an end loading call.
|
||||
- (void)startLoading;
|
||||
|
||||
// Returns if it is showing.
|
||||
- (BOOL)isShowing;
|
||||
|
||||
// One of the loads stopped loading.
|
||||
- (void)stopLoading:(BOOL)animate;
|
||||
|
||||
// Forces to stop loading even if other items are still loading.
|
||||
- (void)forceStopLoading:(BOOL)animate;
|
||||
|
||||
@end
|
||||
@ -1,17 +0,0 @@
|
||||
//
|
||||
// MVMCoreLoadingViewControllerProtocol.h
|
||||
// MVMCore
|
||||
//
|
||||
// Created by Pfeil, Scott Robert on 11/21/17.
|
||||
// Copyright © 2017 myverizon. All rights reserved.
|
||||
//
|
||||
|
||||
@protocol MVMCoreLoadingViewControllerProtocol
|
||||
|
||||
// Called when the view controller should animate loading
|
||||
- (void)startLoading;
|
||||
|
||||
// Called when the view controller should stop animating loading.
|
||||
- (void)stopLoading;
|
||||
|
||||
@end
|
||||
@ -1,31 +0,0 @@
|
||||
//
|
||||
// MVMCoreLoggingDelegateProtocol.h
|
||||
// MVMCore
|
||||
//
|
||||
// Created by Pfeil, Scott Robert on 11/28/17.
|
||||
// Copyright © 2017 myverizon. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
@class MVMCoreAlertController;
|
||||
|
||||
@protocol MVMCoreLoggingDelegateProtocol <NSObject>
|
||||
|
||||
@optional
|
||||
|
||||
// Can be used to log different actions performed by the core.
|
||||
- (void)handleDebugMessage:(nullable NSString *)message;
|
||||
|
||||
// Can be used to log different actions performed by the core.
|
||||
- (void)logWithObject:(nullable id)object withName:(nullable NSString *)name withExtraInfo:(nullable NSDictionary *)extra;
|
||||
|
||||
// Can be used to choose how to log error objects.
|
||||
- (void)addErrorToLog:(nonnull MVMCoreErrorObject *)errorObject;
|
||||
|
||||
// Log that the load has finished.
|
||||
- (void)logLoadFinished:(nullable MVMCoreLoadObject *)loadObject loadedViewController:(nullable UIViewController <MVMCoreViewControllerProtocol> *)loadedViewController error:(nullable MVMCoreErrorObject *)error;
|
||||
|
||||
// Log alert
|
||||
- (void)logAlertForAlertController:(nullable MVMCoreAlertController *)alertController;
|
||||
|
||||
@end
|
||||
@ -1,29 +0,0 @@
|
||||
//
|
||||
// MVMCoreLoggingHandler.h
|
||||
// MVMCore
|
||||
//
|
||||
// Created by Pfeil, Scott Robert on 11/28/17.
|
||||
// Copyright © 2017 myverizon. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <MVMCore/MVMCoreErrorObject.h>
|
||||
#import <MVMCore/MVMCoreViewControllerProtocol.h>
|
||||
#import <MVMCore/MVMCoreLoadObject.h>
|
||||
#import <MVMCore/MVMCoreLoggingDelegateProtocol.h>
|
||||
@class MVMCoreAlertController;
|
||||
|
||||
#define MVMCoreLog(fmt, ...) \
|
||||
[MVMCoreLoggingHandler logDebugMessageWithDelegate:[NSString stringWithFormat:(@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__]];
|
||||
|
||||
@interface MVMCoreLoggingHandler : NSObject <MVMCoreLoggingDelegateProtocol>
|
||||
|
||||
+ (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;
|
||||
+ (void)logWithDelegateLoadFinished:(nullable MVMCoreLoadObject *)loadObject loadedViewController:(nullable UIViewController <MVMCoreViewControllerProtocol> *)loadedViewController error:(nullable MVMCoreErrorObject *)error;
|
||||
+ (void)logAlertForAlertController:(nullable MVMCoreAlertController *)alertController;
|
||||
|
||||
@end
|
||||
@ -1,140 +0,0 @@
|
||||
//
|
||||
// MVMCoreNavigationHandler.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by Scott Pfeil on 11/18/15.
|
||||
// Copyright © 2015 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
// This class should be used to handle all navigation and presentation for mvm.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <MVMCore/MVMCorePresentationDelegateProtocol.h>
|
||||
|
||||
@class MVMCoreOperation;
|
||||
@class MVMCoreNavigationObject;
|
||||
@class MVMCoreLoadObject;
|
||||
|
||||
@interface MVMCoreNavigationHandler : NSObject
|
||||
|
||||
// Returns the shared instance of this singleton
|
||||
+ (nullable instancetype)sharedNavigationHandler;
|
||||
|
||||
// Can set the view controller to present on... will use MF if nil.
|
||||
@property (nullable, nonatomic, weak) UIViewController *viewControllerToPresentOn;
|
||||
|
||||
// reference to main navigation controller
|
||||
@property (nullable, weak, nonatomic) UINavigationController *navigationController;
|
||||
|
||||
|
||||
// Will navigate appropriately based on the load style
|
||||
- (void)navigateWithLoadObject:(nullable MVMCoreLoadObject *)loadObject viewController:(nonnull UIViewController *)viewController delegate:(nullable NSObject<MVMCorePresentationDelegateProtocol>*)delegate completionHandler:(nullable void (^)(void))completionBlock;
|
||||
|
||||
// Perform navigation with object.
|
||||
- (void)startNavigationWithNavigationObject:(nonnull MVMCoreNavigationObject *)navigationObject delegate:(nullable NSObject<MVMCorePresentationDelegateProtocol>*)delegate completionHandler:(nullable void (^)(void))completionBlock;
|
||||
|
||||
// pops or dimisses as needed
|
||||
- (void)removeCurrentViewController;
|
||||
|
||||
#pragma mark - Navigation Simple
|
||||
// Uses the default navigation controller in app delegate
|
||||
|
||||
// Use this to push.
|
||||
- (void)pushViewController:(nonnull UIViewController *)viewController animated:(BOOL)animated;
|
||||
|
||||
// Use this to replace the top view controller.
|
||||
- (void)replaceTopViewControllerWithViewController:(nonnull UIViewController *)viewController animated:(BOOL)animated;
|
||||
|
||||
// Use this to replace all the view controllers after the root with the passed in view controller.
|
||||
- (void)replaceAfterRoot:(nonnull UIViewController *)viewController animated:(BOOL)animated;
|
||||
|
||||
// Use this to set the navigation stack.
|
||||
- (void)setViewControllers:(nonnull NSArray *)viewControllers animated:(BOOL)animated;
|
||||
|
||||
// Use this to pop.
|
||||
- (void)popTopViewControllerAnimated:(BOOL)animated;
|
||||
|
||||
// Use this to pop a specific view controller.
|
||||
- (void)popViewController:(nonnull UIViewController *)viewController animated:(BOOL)animated;
|
||||
|
||||
// Use this to pop to a specific view controller in the stack.
|
||||
- (void)popToViewController:(nonnull UIViewController *)viewController animated:(BOOL)animated;
|
||||
|
||||
// Use this to pop to a view controller of a specific class in the stack.
|
||||
- (void)popToInstanceOfClass:(nonnull Class)viewControllerClass animated:(BOOL)animated;
|
||||
|
||||
// Use this to pop to a view controller of a specific page type in the stack.
|
||||
- (void)popToViewControllerWithPageType:(nonnull NSString *)pageType animated:(BOOL)animated;
|
||||
|
||||
// Use this to pop to the root of the stack.
|
||||
- (void)popToRootAnimated:(BOOL)animated;
|
||||
|
||||
// Adds the navigation operation to the queue.
|
||||
- (void)addNavigationOperation:(nonnull MVMCoreOperation *)operation;
|
||||
|
||||
// Removes all queued up items.
|
||||
- (void)cancelNavigation;
|
||||
|
||||
#pragma mark - Navigation Extra
|
||||
|
||||
// Use this to push.
|
||||
- (void)pushViewController:(nonnull UIViewController *)viewController navigationController:(nullable UINavigationController *)navigationController animated:(BOOL)animated delegate:(nullable NSObject<MVMCorePresentationDelegateProtocol>*)delegate replaceInStack:(BOOL)replaceInStack completionHandler:(nullable void (^)(void))completionBlock;
|
||||
|
||||
// Use this to replace the top view controller.
|
||||
- (void)replaceTopViewControllerWithViewController:(nonnull UIViewController *)viewController navigationController:(nullable UINavigationController *)navigationController animated:(BOOL)animated delegate:(nullable NSObject<MVMCorePresentationDelegateProtocol>*)delegate replaceInStack:(BOOL)replaceInStack completionHandler:(nullable void (^)(void))completionBlock;
|
||||
|
||||
// Use this to replace all the view controllers after the root with the passed in view controller. If no navigation controller is provided, will use the main one in app delegate.
|
||||
- (void)replaceAfterRoot:(nonnull UIViewController *)viewController navigationController:(nullable UINavigationController *)navigationController animated:(BOOL)animated delegate:(nullable NSObject<MVMCorePresentationDelegateProtocol>*)delegate replaceInStack:(BOOL)replaceInStack completionHandler:(nullable void (^)(void))completionBlock;
|
||||
|
||||
// Use this to set the navigation stack. If no navigation controller is provided, will use the main one in app delegate.
|
||||
- (void)setViewControllers:(nonnull NSArray *)viewControllers navigationController:(nullable UINavigationController *)navigationController animated:(BOOL)animated delegate:(nullable NSObject<MVMCorePresentationDelegateProtocol>*)delegate replaceInStack:(BOOL)replaceInStack completionHandler:(nullable void (^)(void))completionBlock;
|
||||
|
||||
// Use this to pop. If no navigation controller is provided, will use the main one in app delegate.
|
||||
- (void)popTopViewControllerAnimated:(BOOL)animated navigationController:(nullable UINavigationController *)navigationController delegate:(nullable NSObject<MVMCorePresentationDelegateProtocol>*)delegate completionHandler:(nullable void (^)(void))completionBlock;
|
||||
|
||||
// Use this to pop a specific view controller. If no navigation controller is provided, will use the main one in app delegate.
|
||||
- (void)popViewController:(nonnull UIViewController *)viewController navigationController:(nullable UINavigationController *)navigationController animated:(BOOL)animated delegate:(nullable NSObject<MVMCorePresentationDelegateProtocol>*)delegate completionHandler:(nullable void (^)(void))completionBlock;
|
||||
|
||||
// Use this to pop to a specific view controller in the stack. If no navigation controller is provided, will use the main one in app delegate.
|
||||
- (void)popToViewController:(nonnull UIViewController *)viewController navigationController:(nullable UINavigationController *)navigationController animated:(BOOL)animated delegate:(nullable NSObject<MVMCorePresentationDelegateProtocol>*)delegate completionHandler:(nullable void (^)(void))completionBlock;
|
||||
|
||||
// Use this to pop to a view controller of a specific class in the stack. If no navigation controller is provided, will use the main one in app delegate.
|
||||
- (void)popToInstanceOfClass:(nonnull Class)viewControllerClass navigationController:(nullable UINavigationController *)navigationController animated:(BOOL)animated delegate:(nullable NSObject<MVMCorePresentationDelegateProtocol>*)delegate completionHandler:(nullable void (^)(void))completionBlock;
|
||||
|
||||
// Use this to pop to a view controller of a specific pageType in the stack. If no navigation controller is provided, will use the main one in app delegate.
|
||||
- (void)popToViewControllerWithPageType:(nonnull NSString *)pageType navigationController:(nullable UINavigationController *)navigationController animated:(BOOL)animated delegate:(nullable NSObject<MVMCorePresentationDelegateProtocol>*)delegate completionHandler:(nullable void (^)(void))completionBlock;
|
||||
|
||||
// Use this to pop to the root of the stack. If no navigation controller is provided, will use the main one in app delegate.
|
||||
- (void)popToRootAnimated:(BOOL)animated navigationController:(nullable UINavigationController *)navigationController delegate:(nullable NSObject<MVMCorePresentationDelegateProtocol>*)delegate completionHandler:(nullable void (^)(void))completionBlock;
|
||||
|
||||
#pragma mark - Presentation Simple
|
||||
|
||||
// Use this to present.
|
||||
- (void)presentViewController:(nonnull UIViewController *)viewController animated:(BOOL)animated;
|
||||
|
||||
// Use this to dismiss.
|
||||
- (void)dismissTopViewControllerAnimated:(BOOL)animated;
|
||||
|
||||
// Use this to dismiss a specific view controller and any it may be presenting.
|
||||
- (void)dismissViewController:(nonnull UIViewController *)viewController animated:(BOOL)animated;
|
||||
|
||||
// Use this to dismiss all presented view controllers stacked on the bottom one.
|
||||
- (void)dismissToBottom:(BOOL)animated;
|
||||
|
||||
// Removes all queued up items.
|
||||
- (void)cancelPresentation;
|
||||
|
||||
#pragma mark - Presentation Extra
|
||||
|
||||
// Use this to present.
|
||||
- (void)presentViewController:(nonnull UIViewController *)viewController animated:(BOOL)animated delegate:(nullable NSObject<MVMCorePresentationDelegateProtocol>*)delegate completionHandler:(nullable void (^)(void))completionBlock;
|
||||
|
||||
// Use this to dismiss.
|
||||
- (void)dismissTopViewControllerAnimated:(BOOL)animated delegate:(nullable NSObject<MVMCorePresentationDelegateProtocol>*)delegate completionHandler:(nullable void (^)(void))completionBlock;
|
||||
|
||||
// Use this to dismiss a specific view controller and any it may be presenting.
|
||||
- (void)dismissViewController:(nonnull UIViewController *)viewController animated:(BOOL)animated delegate:(nullable NSObject<MVMCorePresentationDelegateProtocol>*)delegate completionHandler:(nullable void (^)(void))completionBlock;
|
||||
|
||||
// Use this to dismiss all presented view controllers stacked on the bottom one.
|
||||
- (void)dismissToBottom:(BOOL)animated delegate:(nullable NSObject<MVMCorePresentationDelegateProtocol>*)delegate completionHandler:(nullable void (^)(void))completionBlock;
|
||||
|
||||
@end
|
||||
@ -1,27 +0,0 @@
|
||||
//
|
||||
// MVMCoreNavigationObject.h
|
||||
// mobilefirst
|
||||
//
|
||||
// Created by Scott Pfeil on 4/22/16.
|
||||
// Copyright © 2016 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <MVMCore/MVMCoreConstants.h>
|
||||
|
||||
@interface MVMCoreNavigationObject : NSObject
|
||||
|
||||
@property (nullable, strong, nonatomic) UIViewController *viewController;
|
||||
@property (nullable, strong, nonatomic) UINavigationController *navigationController;
|
||||
@property (nullable, strong, nonatomic) NSArray *viewControllers;
|
||||
@property (nullable, strong, nonatomic) Class classToPopTo;
|
||||
@property (nullable, strong, nonatomic) NSString *pageTypeToPopTo;
|
||||
@property (nonatomic) NavigationType navigationType;
|
||||
@property (nonatomic) BOOL animated;
|
||||
@property (nonatomic) BOOL tryToReplaceFirst;
|
||||
@property (nonatomic) BOOL stopLoadingOverlay;
|
||||
|
||||
- (nullable instancetype)initWithViewController:(nullable UIViewController *)viewController navigationController:(nullable UINavigationController *)navigationController viewControllers:(nullable NSArray *)viewControllers animated:(BOOL)animated tryToReplaceFirst:(BOOL)tryToReplaceFirst navigationType:(NavigationType)navigationType;
|
||||
|
||||
@end
|
||||
@ -1,22 +0,0 @@
|
||||
//
|
||||
// MVMCoreNavigationOperation.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by Scott Pfeil on 11/17/15.
|
||||
// Copyright © 2015 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
// Handles navigation
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "MVMCoreOperation.h"
|
||||
#import "MVMCorePresentationDelegateProtocol.h"
|
||||
|
||||
@class MVMCoreNavigationObject;
|
||||
|
||||
@interface MVMCoreNavigationOperation : MVMCoreOperation <UINavigationControllerDelegate>
|
||||
|
||||
@property (nullable, weak, nonatomic) NSObject<MVMCorePresentationDelegateProtocol> *delegate;
|
||||
|
||||
- (nullable instancetype)initWithNavigationObject:(nonnull MVMCoreNavigationObject *)navigationObject;
|
||||
|
||||
@end
|
||||
@ -1,44 +0,0 @@
|
||||
//
|
||||
// MVMCoreObject.h
|
||||
// MVMCore
|
||||
//
|
||||
// Created by Pfeil, Scott Robert on 11/21/17.
|
||||
// Copyright © 2017 myverizon. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <MVMCore/MVMCoreSessionObject.h>
|
||||
#import <MVMCore/MVMCoreCache.h>
|
||||
#import <MVMCore/MVMCoreViewControllerMappingObject.h>
|
||||
#import <MVMCore/MVMCoreActionHandler.h>
|
||||
#import <MVMCore/MVMCoreSessionTimeHandler.h>
|
||||
#import <MVMCore/MVMCoreGlobalLoadProtocol.h>
|
||||
#import <MVMCore/MVMCoreLoadingOverlayDelegateProtocol.h>
|
||||
#import <MVMCore/MVMCoreLoggingDelegateProtocol.h>
|
||||
#import <MVMCore/MVMCoreGlobalTopAlertDelegateProtocol.h>
|
||||
#import <MVMCore/MVMCoreLoggingHandler.h>
|
||||
|
||||
@interface MVMCoreObject : NSObject
|
||||
|
||||
@property (nullable, strong, nonatomic) MVMCoreSessionObject *session;
|
||||
@property (nullable, strong, nonatomic) MVMCoreCache *cache;
|
||||
@property (nullable, strong, nonatomic) MVMCoreViewControllerMappingObject *viewControllerMapping;
|
||||
@property (nullable, strong, nonatomic) MVMCoreActionHandler *actionHandler;
|
||||
@property (nullable, strong, nonatomic) MVMCoreSessionTimeHandler *sessionHandler;
|
||||
|
||||
// The delegates
|
||||
@property (nullable, strong, nonatomic) id <MVMCoreGlobalLoadProtocol> globalLoadDelegate;
|
||||
@property (nullable, strong, nonatomic) id <MVMCoreLoadingOverlayDelegateProtocol> loadingProtocol;
|
||||
@property (nullable, strong, nonatomic) NSObject <MVMCoreLoggingDelegateProtocol> *loggingDelegate;
|
||||
@property (nullable, strong, nonatomic) id <MVMCoreGlobalTopAlertDelegateProtocol> globalTopAlertDelegate;
|
||||
|
||||
// A reference to the calling application delegate that should be set. For a normal app, could be the UIApplicationDelegate. For watch, could be WKExtensionDelegate. For iMessage, could be MSMessagesAppViewController. etc, etc. Useful for the framework to call delegate specific functions.
|
||||
@property (nullable, weak, nonatomic) id applicationDelegate;
|
||||
|
||||
// A singleton.
|
||||
+ (nullable instancetype)sharedInstance;
|
||||
|
||||
// Sets up with a default session, cache, view controller mapping, action handler, session handler, and logging delegate.
|
||||
- (void)defaultInitialSetup;
|
||||
|
||||
@end
|
||||
@ -1,20 +0,0 @@
|
||||
//
|
||||
// MVMCoreOperation.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by Scott Pfeil on 9/28/15.
|
||||
// Copyright © 2015 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
// Base operation. It is concurrent/asyncronous, but it is only expected to be started with NSOperationQueue (the start function does not fire off another thread! So don't call start manually unless you are on the thread you desire).
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface MVMCoreOperation : NSOperation
|
||||
|
||||
// Checks for cancellation and then marks as finished if so.
|
||||
- (BOOL)checkAndHandleForCancellation;
|
||||
|
||||
// Does the proper KVO finished stuff.
|
||||
- (void)markAsFinished;
|
||||
|
||||
@end
|
||||
@ -1,19 +0,0 @@
|
||||
//
|
||||
// MVMCorePresentAnimationOperation.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by Scott Pfeil on 11/25/15.
|
||||
// Copyright © 2015 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
// Should be added to the main queue. Presents the view controller on the presenting view controller.
|
||||
|
||||
#import "MVMCoreOperation.h"
|
||||
#import "MVMCorePresentationDelegateProtocol.h"
|
||||
|
||||
@interface MVMCorePresentAnimationOperation : MVMCoreOperation
|
||||
|
||||
@property (nullable, weak, nonatomic) NSObject<MVMCorePresentationDelegateProtocol> *delegate;
|
||||
|
||||
- (nullable instancetype)initWithPresentingViewController:(nullable UIViewController *)presentingViewController presentedViewController:(nullable UIViewController *)presentedViewController animated:(BOOL)animated;
|
||||
|
||||
@end
|
||||
@ -1,20 +0,0 @@
|
||||
//
|
||||
// MVMCorePresentViewControllerOperation.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by Scott Pfeil on 9/28/15.
|
||||
// Copyright © 2015 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
// An operation for presenting a view controller. Depends on alert as well. Should NOT go onto the main queue.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "MVMCoreOperation.h"
|
||||
#import "MVMCorePresentationDelegateProtocol.h"
|
||||
|
||||
@interface MVMCorePresentViewControllerOperation : MVMCoreOperation
|
||||
|
||||
@property (nullable, weak, nonatomic) NSObject<MVMCorePresentationDelegateProtocol> *delegate;
|
||||
|
||||
- (nullable instancetype)initWithPresentingViewController:(nullable UIViewController *)presentingViewController presentedViewController:(nullable UIViewController *)presentedViewController animated:(BOOL)animated;
|
||||
|
||||
@end
|
||||
@ -1,40 +0,0 @@
|
||||
//
|
||||
// MVMCorePresentationDelegateProtocol.h
|
||||
// mobilefirst
|
||||
//
|
||||
// Created by Scott Pfeil on 2/16/16.
|
||||
// Copyright © 2016 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@protocol MVMCorePresentationDelegateProtocol
|
||||
|
||||
@optional
|
||||
|
||||
// Called when a view controller will be displayed on a navigation controller
|
||||
- (void)navigationController:(nonnull UINavigationController *)navigationController willDisplayViewController:(nonnull UIViewController *)viewController;
|
||||
|
||||
// Called when a view controller has been displayed on a navigation controller
|
||||
- (void)navigationController:(nonnull UINavigationController *)navigationController displayedViewController:(nonnull UIViewController *)viewController;
|
||||
|
||||
// Called when interactive transition get canceled
|
||||
- (void)navigationController:(nonnull UINavigationController *)navigationController interactiveTransitionWasCanceled:(BOOL)canceled;
|
||||
|
||||
|
||||
- (nullable id <UIViewControllerAnimatedTransitioning>)navigationController:(nonnull UINavigationController *)navigationController
|
||||
animationControllerForOperation:(UINavigationControllerOperation)operation
|
||||
fromViewController:(nonnull UIViewController *)fromVC
|
||||
toViewController:(nonnull UIViewController *)toVC NS_AVAILABLE_IOS(7_0);
|
||||
|
||||
- (nullable id <UIViewControllerInteractiveTransitioning>)navigationController:(nonnull UINavigationController *)navigationController
|
||||
interactionControllerForAnimationController:(nonnull id <UIViewControllerAnimatedTransitioning>) animationController NS_AVAILABLE_IOS(7_0);
|
||||
|
||||
// Called when a view controller will be presented on another view controller
|
||||
- (void)viewController:(nonnull UIViewController *)presentingViewController willPresentViewController:(nonnull UIViewController *)presentedViewController;
|
||||
|
||||
// Called when a view controller did be present on another
|
||||
- (void)viewController:(nonnull UIViewController *)presentingViewController didPresentViewController:(nonnull UIViewController *)presentedViewController;
|
||||
|
||||
@end
|
||||
@ -1,117 +0,0 @@
|
||||
//
|
||||
// MVMCoreRequestParameters.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by Scott Pfeil on 3/4/14.
|
||||
// Copyright (c) 2014 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
// An object for the request parameters
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
// The loading style.
|
||||
// MFLoadStyleDefault: This means it has not been explicitely set by the developer. Standard push.
|
||||
// MFLoadStylePush: Set explicitely to push.
|
||||
// MFLoadStyleReplaceCurrent: Replaces the current view controller if possible.
|
||||
// MFLoadStyleOnTopOfRoot: Loads ontop of the root controller.
|
||||
// MFLoadStyleBecomeRoot: Load as the root controller.
|
||||
typedef NS_ENUM(NSInteger, MFLoadStyle) {
|
||||
MFLoadStyleDefault = 0,
|
||||
MFLoadStylePush,
|
||||
MFLoadStyleReplaceCurrent,
|
||||
MFLoadStyleOnTopOfRoot,
|
||||
MFLoadStyleBecomeRoot,
|
||||
MFLoadStylePresent
|
||||
};
|
||||
|
||||
@interface MVMCoreRequestParameters : NSObject <NSCopying>
|
||||
|
||||
// request parameters
|
||||
@property (nullable, strong, nonatomic) NSString *pageType;
|
||||
@property (nullable, strong, nonatomic) NSArray *modules;
|
||||
@property (nullable, strong, nonatomic) NSDictionary *parameters;
|
||||
@property (nullable, strong, nonatomic) NSData *imageData;
|
||||
|
||||
// adding parent pageType for freebee
|
||||
@property (nullable, strong, nonatomic) NSString *parentPageType;
|
||||
|
||||
// Context root for server
|
||||
@property (nullable, strong, nonatomic) NSString *contextRoot;
|
||||
|
||||
// A flag for if you do not want to try loading any actual view controller. (Unless there is an error screen)
|
||||
@property (assign, nonatomic) BOOL noViewControllerToLoad;
|
||||
|
||||
// A flag for if you want a view controller to be created but not displayed. (Unless there is an error screen)
|
||||
@property (assign, nonatomic) BOOL dontDisplayViewController;
|
||||
|
||||
// A flag for if you don't want loading overlay to display.
|
||||
@property (nonatomic) BOOL noloadingOverlay;
|
||||
|
||||
// A flag for if we should hide any errors from the user or not.
|
||||
@property (assign, nonatomic) BOOL handleErrorsSilently;
|
||||
|
||||
// A flag for if you want to override pushing view animated or not.
|
||||
@property (assign, nonatomic) BOOL shouldNotAnimatePush;
|
||||
|
||||
// A flag for if we want to override making a request to server if fail to load from cache
|
||||
@property (assign, nonatomic) BOOL shouldNotGoToServerOnCacheFail;
|
||||
|
||||
// A flag for if we never want to load from the cache
|
||||
@property (assign, nonatomic) BOOL neverLoadFromCache;
|
||||
|
||||
// A flag for if we should be adding the initial request parameters.
|
||||
@property (assign, nonatomic) BOOL addInitialRequestParameters;
|
||||
|
||||
// A list of initial parameter sections to blacklist / skip.
|
||||
@property (nullable, strong, nonatomic) NSSet<NSString *> *excludedInitialParameters;
|
||||
|
||||
// A flag for if we should always show alerts, even during a background load.
|
||||
@property (assign) BOOL allowAlertsIfBackgroundRequest;
|
||||
|
||||
// Determines how it is loaded.
|
||||
@property (nonatomic) MFLoadStyle loadStyle;
|
||||
@property (nonatomic) BOOL replaceViewIfOnStackElseLoadWithStyle;
|
||||
|
||||
// A flag for if a tab was pressed to cause this load. This will ensure that we do not load a new tab page.
|
||||
@property (nonatomic) BOOL tabWasPressed;
|
||||
|
||||
// Can provide a specific navigation controller to use for loading. Will use the default other wise.
|
||||
@property (nullable, weak, nonatomic) UINavigationController *navigationController;
|
||||
|
||||
// If the request was created with an action map.
|
||||
@property (nullable, strong, nonatomic) NSDictionary *actionMap;
|
||||
|
||||
// only used when the base url is not the same as mf
|
||||
@property (nullable, strong, nonatomic) NSURL *alternateBaseURL;
|
||||
|
||||
@property (nullable, strong, nonatomic) NSNumber *customTimeoutTime;
|
||||
|
||||
// Will open support panel at the end of the load.
|
||||
@property (nonatomic) BOOL openSupportPanel;
|
||||
|
||||
// A list of page types that this operation should NOT be loaded in parallel with.
|
||||
@property (nullable, strong, nonatomic) NSArray<NSString *> * successivePageTypes;
|
||||
|
||||
// Creates an object with the given page type and extra parameters. Adds the extra parameters to the standard request parameters. Will add any modules needed by the page type by default.
|
||||
- (nullable instancetype)initWithPageType:(nonnull NSString *)pageType extraParameters:(nullable NSDictionary *)extraParameters;
|
||||
|
||||
// Creates an object with the given page type, modules, and extra parameters. Adds the extra parameters to the standard request parameters.
|
||||
- (nullable instancetype)initWithPageType:(nonnull NSString *)pageType additionalModules:(nonnull NSArray *)additionalModules extraParameters:(nullable NSDictionary *)extraParameters;
|
||||
|
||||
// Creates an object with the given modules. Adds the extra parameters to the standard request parameters.
|
||||
- (nullable instancetype)initWithModules:(nonnull NSArray *)modules extraParameters:(nullable NSDictionary *)extraParameters;
|
||||
|
||||
// Initializes the object with an action map.
|
||||
- (nullable instancetype)initWithActionMap:(nonnull NSDictionary *)actionMap;
|
||||
|
||||
// Adds the passed in parameters.
|
||||
- (void)addRequestParameters:(nonnull NSDictionary *)parameters;
|
||||
|
||||
// Removes the passed in parameters.
|
||||
- (void)removeRequestParameterWithKey:(nonnull NSString *)key;
|
||||
|
||||
// Sets the load style based on the server sent presentationStyle
|
||||
- (void)setMFLoadStyleBasedOnPresentationStyle:(nonnull NSString *)presentationStyle;
|
||||
|
||||
@end
|
||||
@ -1,46 +0,0 @@
|
||||
//
|
||||
// MVMCoreSessionObject.h
|
||||
// MVMCore
|
||||
//
|
||||
// Created by Pfeil, Scott Robert on 11/22/17.
|
||||
// Copyright © 2017 myverizon. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface MVMCoreSessionObject : NSObject <NSURLSessionTaskDelegate>
|
||||
|
||||
// the session used for all requests.
|
||||
@property (nullable, strong, nonatomic) NSURLSession *session;
|
||||
|
||||
// the session used for all Freebee requests.
|
||||
@property (nullable, strong, nonatomic) NSURLSession *freeBeeSession;
|
||||
|
||||
// The server base url (Until prepay is native, this will always be postpay).
|
||||
@property (nullable, strong, nonatomic) NSURL *baseURL;
|
||||
|
||||
// The context root to use on the base url.
|
||||
@property (nullable, strong, nonatomic) NSString *contextRoot;
|
||||
|
||||
|
||||
// Returns the shared instance of this singleton
|
||||
+ (nullable instancetype)sharedGlobal;
|
||||
|
||||
// Creates the nsurlsession with default configuration and no delegate. Can subclass for different session.
|
||||
- (nonnull NSURLSession *)createNSURLSession;
|
||||
|
||||
// Gets inital parameters for request parameters.
|
||||
- (nullable NSDictionary *)getInitialParameters;
|
||||
// Gets inital parameters for request parameters excluding any items given a list of key names.
|
||||
- (nullable NSDictionary *)getInitialParametersExcludingSections:(nullable NSSet<NSString *> *)excludeSections;
|
||||
|
||||
// Restarts the application session state. Can clear variables and pass a page type if needed.
|
||||
- (void)restartSessionWithPageType:(nullable NSString *)pageType parameters:(nullable NSDictionary *)parameters clearAllVariables:(BOOL)clearAllVariables;
|
||||
|
||||
// Redirect, leaving the current app experience.
|
||||
- (void)redirectWithInfo:(nullable NSDictionary *)dictionary;
|
||||
|
||||
// Clears the session singleton. Creates a new session NSURLSession also.
|
||||
- (void)clearSessionObject;
|
||||
|
||||
@end
|
||||
@ -1,56 +0,0 @@
|
||||
//
|
||||
// MVMCoreSessionTimeHandler.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by Scott Pfeil on 2/25/14.
|
||||
// Copyright (c) 2014 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
// Handles the session timer.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@class MVMCoreErrorObject;
|
||||
|
||||
@interface MVMCoreSessionTimeHandler : NSObject
|
||||
|
||||
// The time that we started the last session timer.
|
||||
@property (assign, nonatomic, readonly) NSTimeInterval timeTimerStarted;
|
||||
|
||||
#pragma mark - functions to override
|
||||
|
||||
// Can override to provide a time until the warning shows in seconds. Set to 0 if there should be no warning. Default is 0
|
||||
- (NSTimeInterval)timeUntilWarning;
|
||||
|
||||
// Can override to provide a time until the timeout happens in seconds. If there is a warning, then this value is used after the warning happens. Set to 0 if there should be no timeout. Default is 0.
|
||||
- (NSTimeInterval)timeUntilTimeout;
|
||||
|
||||
// Starts the timeout timer. Override to handle what happens on timeout warning. Should call super if want the timeout timer going.
|
||||
- (void)sessionTimeoutWarning NS_REQUIRES_SUPER;
|
||||
|
||||
// Called when the session has timed out. Override to handle what happens on timeout. Should call super. Can be called to force timeout... should never need to call unless simulating timout.
|
||||
- (void)sessionTimeout:(BOOL)whileInBackground NS_REQUIRES_SUPER;
|
||||
|
||||
// Keeps the session alive. A boolean for if we should show the alert if there is an error. Does nothing by default. Can override to do something.
|
||||
- (void)sendKeepAliveToServer:(BOOL)notifyUserIfError;
|
||||
|
||||
// Invalidates the server session and then calls the completion handler. Error may or may not populate. By default this only calls the completion handler, override to invalidate your server session as you see fit then call completion.
|
||||
- (void)invalidateSession:(void (^ __nullable)(MVMCoreErrorObject * _Nullable error))completion;
|
||||
|
||||
#pragma mark - Session timer functions
|
||||
|
||||
// Returns the shared instance of this singleton
|
||||
+ (nullable instancetype)sharedSessionHandler;
|
||||
|
||||
// Starts the session timer. Should be called after every response from the server. Happens on the main thread.
|
||||
- (void)startSessionTimer;
|
||||
|
||||
// Should only be used in rare occassions, like on the original wifi screen.
|
||||
- (void)stopSessionTimer;
|
||||
|
||||
// Returns whether the app is in session.
|
||||
- (BOOL)isAppInSession;
|
||||
|
||||
// Resets everything.
|
||||
- (void)resetState;
|
||||
|
||||
@end
|
||||
@ -1,22 +0,0 @@
|
||||
//
|
||||
// MVMCoreTopAlertAnimationDelegateProtocol.h
|
||||
// mobilefirst
|
||||
//
|
||||
// Created by Scott Pfeil on 6/4/16.
|
||||
// Copyright © 2016 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@protocol MVMCoreTopAlertAnimationDelegateProtocol
|
||||
|
||||
// Called when the top alert is starting an animation
|
||||
- (void)topAlertViewBeginAnimation;
|
||||
|
||||
// Called when the top alert is ending an animation
|
||||
- (void)topAlertViewFinishAnimation;
|
||||
|
||||
// Called when the top alert close button was pressed by the user
|
||||
- (void)topAlertCloseButtonPressed;
|
||||
|
||||
@end
|
||||
@ -1,23 +0,0 @@
|
||||
//
|
||||
// MVMCoreTopAlertDelegateProtocol.h
|
||||
// mobilefirst
|
||||
//
|
||||
// Created by Scott Pfeil on 6/4/16.
|
||||
// Copyright © 2016 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@class MVMCoreTopAlertObject;
|
||||
|
||||
@protocol MVMCoreTopAlertDelegateProtocol
|
||||
|
||||
@optional
|
||||
|
||||
- (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
|
||||
@ -1,60 +0,0 @@
|
||||
//
|
||||
// MVMCoreTopAlertObject.h
|
||||
// mobilefirst
|
||||
//
|
||||
// Created by Scott Pfeil on 5/24/16.
|
||||
// Copyright © 2016 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <MVMCore/MVMCoreTopAlertDelegateProtocol.h>
|
||||
|
||||
extern NSUInteger const TopAlertDismissTime;
|
||||
|
||||
@interface MVMCoreTopAlertObject : NSObject
|
||||
|
||||
@property (nonatomic) BOOL persistent;
|
||||
@property (nullable, nonatomic) NSString *type;
|
||||
|
||||
// The text
|
||||
@property (nullable, strong, nonatomic) NSString *title;
|
||||
@property (nullable, strong, nonatomic) NSString *message;
|
||||
@property (nullable, strong, nonatomic) NSString *topMessage;
|
||||
|
||||
// For the button.
|
||||
@property (nullable, strong, nonatomic) NSDictionary *buttonMap;
|
||||
@property (nullable, strong, nonatomic) NSDictionary *additionalData;
|
||||
@property (nonatomic) BOOL useCloseButton;
|
||||
|
||||
// For non action map driven button.
|
||||
@property (nullable, strong, nonatomic) NSString *buttonTitle;
|
||||
@property (nullable, copy, nonatomic) void (^userActionHandler)(id _Nonnull sender);
|
||||
|
||||
@property (nullable, weak, nonatomic) NSObject <MVMCoreTopAlertDelegateProtocol> *delegate;
|
||||
|
||||
// This is used to ensure legacy style stays intact with new changes
|
||||
@property (nonatomic) BOOL useNewStyle;
|
||||
|
||||
// The page type used for the top alert
|
||||
@property (nullable, strong, nonatomic) NSString *pageType;
|
||||
|
||||
// image name or url used imageviews
|
||||
@property (nullable, strong, nonatomic) NSString *imageNameOrURL;
|
||||
@property (nullable, strong, nonatomic) NSString *aboveTextImageString;
|
||||
|
||||
// If 0, uses default 5 seconds.
|
||||
@property (nonatomic) NSInteger topAlertDismissTime;
|
||||
|
||||
// Server can set color.
|
||||
@property (nullable, strong, nonatomic) UIColor *backgroundColor;
|
||||
@property (nullable, strong, nonatomic) UIColor *textColor;
|
||||
|
||||
- (nullable instancetype)initWithResponseInfo:(nullable NSDictionary *)responseInfo;
|
||||
|
||||
- (nullable instancetype)initWithType:(nullable NSString *)type message:(nullable NSString *)message;
|
||||
|
||||
- (nullable instancetype)initWithType:(nullable NSString *)type message:(nullable NSString *)message subMessage:(nullable NSString *)subMessage persistent:(BOOL)persistent actionMap:(nullable NSDictionary *)actionMap additionalData:(nullable NSDictionary *)additionalData;
|
||||
|
||||
- (nullable instancetype)initWithType:(nullable NSString *)type message:(nullable NSString *)message subMessage:(nullable NSString *)subMessage persistent:(BOOL)persistent buttonTitle:(nullable NSString *)buttonTitle userActionHandler:(nullable void (^)(id _Nonnull sender))userActionHandler;
|
||||
|
||||
@end
|
||||
@ -1,30 +0,0 @@
|
||||
//
|
||||
// MVMCoreTopAlertOperation.h
|
||||
// mobilefirst
|
||||
//
|
||||
// Created by Scott Pfeil on 6/4/16.
|
||||
// Copyright © 2016 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MVMCoreOperation.h"
|
||||
#import "MVMCoreTopAlertAnimationDelegateProtocol.h"
|
||||
|
||||
@class MVMCoreTopAlertObject;
|
||||
|
||||
@interface MVMCoreTopAlertOperation : MVMCoreOperation <MVMCoreTopAlertAnimationDelegateProtocol>
|
||||
|
||||
@property (readonly, getter=isPaused) BOOL paused;
|
||||
|
||||
@property (nonatomic) BOOL reAddAfterCancel;
|
||||
|
||||
@property (nonnull, nonatomic, strong) MVMCoreTopAlertObject *topAlertObject;
|
||||
|
||||
- (nullable instancetype)initWithTopAlertObject:(nonnull MVMCoreTopAlertObject *)topAlertObject;
|
||||
|
||||
// Pauses the operation. Temporarily removes any alert.
|
||||
- (void)pause;
|
||||
|
||||
// Unpauses the operation, resuming any alert.
|
||||
- (void)unpause;
|
||||
|
||||
@end
|
||||
@ -1,25 +0,0 @@
|
||||
//
|
||||
// MVMCoreTopAlertViewProtocol.h
|
||||
// MVMCore
|
||||
//
|
||||
// Created by Pfeil, Scott Robert on 1/2/18.
|
||||
// Copyright © 2018 myverizon. All rights reserved.
|
||||
//
|
||||
|
||||
#import <MVMCore/MVMCoreTopAlertAnimationDelegateProtocol.h>
|
||||
@class MVMCoreTopAlertObject;
|
||||
|
||||
@protocol MVMCoreTopAlertViewProtocol
|
||||
|
||||
@optional
|
||||
|
||||
// Show based on the object
|
||||
- (void)showWithTopAlertObject:(nullable MVMCoreTopAlertObject *)topAlertObject animationDelegate:(nonnull id <MVMCoreTopAlertAnimationDelegateProtocol>)animationDelegate completionHandler:(void (^ __nullable)(BOOL finished))completionHandler;
|
||||
|
||||
// Hides
|
||||
- (void)hideAlertView:(void (^ __nullable)(BOOL finished))completionHandler;
|
||||
|
||||
// Collapses the notification if it has a short top message. Otherwise removes notification.
|
||||
- (void)collapseNotification;
|
||||
|
||||
@end
|
||||
@ -1,21 +0,0 @@
|
||||
//
|
||||
// MVMCoreViewControllerAnimatedTransitioning.h
|
||||
// MVMCore
|
||||
//
|
||||
// Created by Chen, Mingyuan on 6/5/18.
|
||||
// Copyright © 2018 myverizon. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@protocol MVMCoreViewControllerAnimatedTransitioning <UIViewControllerAnimatedTransitioning>
|
||||
|
||||
@required
|
||||
|
||||
/** Property that notifies the navigation controller if the transition was cancelled.
|
||||
*
|
||||
* This property must be KVO compliant (i.e. in Swift add '\@objc dynamic')!
|
||||
*/
|
||||
@property (nonatomic) BOOL interactiveTransitionCanceled;
|
||||
|
||||
@end
|
||||
@ -1,84 +0,0 @@
|
||||
//
|
||||
// MVMCoreViewControllerMappingObject.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by Scott Pfeil on 12/2/13.
|
||||
// Copyright (c) 2013 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
// Singleton for using template id string to create view controllers based on mapping objects. Any given templateID will map to a view controller.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <MVMCore/MVMCoreViewControllerProtocol.h>
|
||||
@class MVMCoreErrorObject;
|
||||
|
||||
// Classes that use the protocol should be able to be added to the mapping and create a view controller when called upon.
|
||||
@protocol MVMCoreViewControllerMappingProtocol <NSObject>
|
||||
|
||||
// Creates and returns an mvm view controller.
|
||||
- (nullable UIViewController <MVMCoreViewControllerProtocol> *)createViewController;
|
||||
|
||||
@end
|
||||
|
||||
@interface MVMCoreViewControllerMappingObject : NSObject
|
||||
|
||||
// The template based mapping.
|
||||
@property (nullable, strong, nonatomic) NSMutableDictionary <NSString *,NSObject <MVMCoreViewControllerMappingProtocol>*> *viewControllerMapping;
|
||||
|
||||
// The modules that the page can't survive without. Will throw an error if not all are found during loading.
|
||||
@property (nullable, strong, nonatomic) NSMutableDictionary *requiredModuleMapping;
|
||||
|
||||
// The modules that the page will ask for but may not get.
|
||||
@property (nullable, strong, nonatomic) NSMutableDictionary *optionalModuleMapping;
|
||||
|
||||
// Legacy: page type based mapping
|
||||
@property (nullable, strong, nonatomic) NSMutableDictionary <NSString *,NSObject <MVMCoreViewControllerMappingProtocol>*> *pageTypeViewControllerMapping;
|
||||
|
||||
// Returns the shared instance
|
||||
+ (nullable instancetype)sharedViewControllerMappingObject;
|
||||
|
||||
#pragma mark - View Controller Mapping
|
||||
|
||||
// Returns the mapping object which maps the given template to how it's view controller is loaded.
|
||||
- (nullable NSObject <MVMCoreViewControllerMappingProtocol>*)getViewControllerMappingForTemplate:(nonnull NSString *)templateID;
|
||||
|
||||
// Creates and returns an mvm view controller of the passed in template or page type using the mapping.
|
||||
- (nullable UIViewController <MVMCoreViewControllerProtocol> *)createMFViewControllerOfTemplate:(nonnull NSString *)templateID;
|
||||
|
||||
// For pages external to the mobile first framework to be added to the view controller mapping.
|
||||
- (void)addToTemplateViewControllerMapping:(nullable NSDictionary <NSString *,NSObject <MVMCoreViewControllerMappingProtocol>*>*)map;
|
||||
|
||||
// Transition function: A mix of new and legacy.
|
||||
- (nullable UIViewController <MVMCoreViewControllerProtocol> *)createMFViewControllerOfTemplate:(nullable NSString *)templateID pageType:(nullable NSString *)pageType;
|
||||
|
||||
#pragma mark - Module PageType Mapping
|
||||
|
||||
// Returns the required modules for a given page.
|
||||
- (nullable NSArray *)modulesRequiredForPageType:(nonnull NSString *)pageType;
|
||||
|
||||
// For pages external to the mobile first framework to add their required modules.
|
||||
- (void)addRequiredModulesToMapping:(nonnull NSArray *)mapping forPageType:(nonnull NSString *)pageType;
|
||||
|
||||
// Returns the optional modules for a given page
|
||||
- (nullable NSArray *)modulesOptionalForPageType:(nonnull NSString *)pageType;
|
||||
|
||||
// For pages external to the mobile first framework to add their optional modules.
|
||||
- (void)addOptionalModulesToMapping:(nonnull NSArray *)mapping forPageType:(nonnull NSString *)pageType;
|
||||
|
||||
// Returns all the modules needed for a given page type.
|
||||
- (nullable NSArray *)allModulesForPageType:(nonnull NSString *)pageType;
|
||||
|
||||
// Add optional modules for multiple pages. Used by external frameworks
|
||||
- (void)addOptionalModulesForPages:(nonnull NSDictionary<NSString*, NSArray<NSString*>*>*)optionalModulesForPages;
|
||||
|
||||
#pragma mark - Legacy PageType driven
|
||||
|
||||
// Returns the mapping object which maps the given page type to how it's view controller is loaded.
|
||||
- (nullable NSObject <MVMCoreViewControllerMappingProtocol>*)getViewControllerMappingForPageType:(nonnull NSString *)pageType;
|
||||
|
||||
// For pages external to the mobile first framework to be added to the view controller mapping for pagetypes.
|
||||
- (void)addToPageTypeViewControllerMapping:(nullable NSDictionary <NSString *,NSObject <MVMCoreViewControllerMappingProtocol>*>*)map;
|
||||
|
||||
// Creates and returns an mvm view controller of the passed in template or page type using the mapping.
|
||||
- (nullable UIViewController <MVMCoreViewControllerProtocol> *)createMFViewControllerOfPageType:(nonnull NSString *)pageType;
|
||||
|
||||
@end
|
||||
@ -1,25 +0,0 @@
|
||||
//
|
||||
// MVMCoreViewControllerNibMappingObject.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by Scott Pfeil on 3/26/14.
|
||||
// Copyright (c) 2014 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
#import <MVMCore/MVMCoreViewControllerMappingObject.h>
|
||||
|
||||
@interface MVMCoreViewControllerNibMappingObject : NSObject <MVMCoreViewControllerMappingProtocol>
|
||||
|
||||
// View Controller Class, for loading from a nib.
|
||||
@property (nonnull, strong, nonatomic) Class viewControllerClass;
|
||||
|
||||
// Nib Name, for loading from a nib.
|
||||
@property (nonnull, strong, nonatomic) NSString *nibName;
|
||||
|
||||
// The bundle where the nib is located.
|
||||
@property (nonnull, strong, nonatomic) NSString *bundleName;
|
||||
|
||||
// Initializes for a nib load.
|
||||
- (nullable id)initWithClass:(nonnull Class)viewControllerClass nibName:(nonnull NSString *)nibName bundleName:(nonnull NSString *)bundleName;
|
||||
|
||||
@end
|
||||
@ -1,19 +0,0 @@
|
||||
//
|
||||
// MVMCoreViewControllerProgrammaticMappingObject.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by Scott Pfeil on 3/26/14.
|
||||
// Copyright (c) 2014 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
#import <MVMCore/MVMCoreViewControllerMappingObject.h>
|
||||
|
||||
@interface MVMCoreViewControllerProgrammaticMappingObject : NSObject <MVMCoreViewControllerMappingProtocol>
|
||||
|
||||
// View Controller Class, for loading by class.
|
||||
@property (nonnull, strong, nonatomic) Class viewControllerClass;
|
||||
|
||||
// Initializes with the given class.
|
||||
- (nullable id)initWithClass:(nonnull Class)viewControllerClass;
|
||||
|
||||
@end
|
||||
@ -1,27 +0,0 @@
|
||||
//
|
||||
// MVMCoreViewControllerProtocol.h
|
||||
// MVMCore
|
||||
//
|
||||
// Created by Pfeil, Scott Robert on 11/22/17.
|
||||
// Copyright © 2017 myverizon. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
@class MVMCoreLoadObject;
|
||||
@class MVMCoreErrorObject;
|
||||
@class DelegateObject;
|
||||
|
||||
@protocol MVMCoreViewControllerProtocol <NSObject>
|
||||
|
||||
@property (nullable, strong, nonatomic) NSString *pageType;
|
||||
|
||||
// This view controller should subclass this function and check the load to make sure it has all the needed data. Fills the error object if there are any errors. Returns if we should finish the load or not. Ideally error should use code ErrorCodeViewControllerProcessingJSON.
|
||||
- (BOOL)shouldFinishProcessingLoad:(nonnull MVMCoreLoadObject *)loadObject error:(MVMCoreErrorObject *_Nonnull *_Nonnull)error;
|
||||
|
||||
@optional
|
||||
|
||||
// Allows override of the delegate to use.
|
||||
- (nullable DelegateObject *)delegateObject;
|
||||
|
||||
@end
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
//
|
||||
// MVMCoreViewControllerStoryBoardMappingObject.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by Scott Pfeil on 3/26/14.
|
||||
// Copyright (c) 2014 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
#import <MVMCore/MVMCoreViewControllerMappingObject.h>
|
||||
|
||||
@interface MVMCoreViewControllerStoryBoardMappingObject : NSObject <MVMCoreViewControllerMappingProtocol>
|
||||
|
||||
// Initializes with a story board load.
|
||||
- (nullable id)initWithStoryBoard:(nonnull NSString *)storyBoard storyBoardIdentifier:(nonnull NSString *)storyBoardIdentifier bundleName:(nonnull NSString *)bundleName;
|
||||
|
||||
// The story board to load from. nil if from a nib.
|
||||
@property (nonnull, strong, nonatomic) NSString *storyBoard;
|
||||
|
||||
// The identifier of the view controller in the story board. nil if from a nib.
|
||||
@property (nonnull, strong, nonatomic) NSString *storyBoardIdentifier;
|
||||
|
||||
// The bundle where the storyboard is located.
|
||||
@property (nonnull, strong, nonatomic) NSString *bundleName;
|
||||
|
||||
@end
|
||||
@ -1,20 +0,0 @@
|
||||
//
|
||||
// MVMCoreViewManagerProtocol.h
|
||||
// MVMCore
|
||||
//
|
||||
// Created by Pfeil, Scott Robert on 11/22/17.
|
||||
// Copyright © 2017 myverizon. All rights reserved.
|
||||
//
|
||||
// A protocol for custom view managers.
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@protocol MVMCoreViewManagerProtocol
|
||||
|
||||
// Return the current view controller showing
|
||||
- (nonnull UIViewController *)getCurrentViewController;
|
||||
|
||||
// Returns if the manage currently contains the page with the page type.
|
||||
- (BOOL)containsPageWithPageType:(nullable NSString *)pageType;
|
||||
|
||||
@end
|
||||
@ -1,29 +0,0 @@
|
||||
//
|
||||
// MVMCoreViewManagerViewControllerProtocol.h
|
||||
// MVMCore
|
||||
//
|
||||
// Created by Pfeil, Scott Robert on 7/25/18.
|
||||
// Copyright © 2018 myverizon. All rights reserved.
|
||||
//
|
||||
// A protocol for view controllers that can be added to a view manager.
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@protocol MVMCoreViewManagerViewControllerProtocol
|
||||
|
||||
@optional
|
||||
|
||||
// Reference to the manager
|
||||
@property (nullable, weak, nonatomic) UIViewController <MVMCoreViewManagerProtocol>*manager;
|
||||
|
||||
// Notifies the view controller that it can be ready (usually means that it's committed to the screen).
|
||||
- (void)viewControllerReadyInManager:(nonnull NSObject <MVMCoreViewManagerProtocol>*)manager;
|
||||
|
||||
// Notifies the current showing view controller that the manager is disappearing.
|
||||
- (void)managerWillDisappear:(nonnull NSObject <MVMCoreViewManagerProtocol>*)manager;
|
||||
|
||||
// Manager can check if the view controller does not want to be cached. You should be following proper caching techniques (caching, updating when needed, deleting when needed), so this should be a last resort.
|
||||
- (BOOL)shouldCacheInManager;
|
||||
|
||||
@end
|
||||
|
||||
@ -1,20 +0,0 @@
|
||||
//
|
||||
// MVMCoreViewProtocol.h
|
||||
// MVMCore
|
||||
//
|
||||
// Created by Pfeil, Scott Robert on 11/22/17.
|
||||
// Copyright © 2017 myverizon. All rights reserved.
|
||||
//
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@protocol MVMCoreViewProtocol <NSObject>
|
||||
|
||||
// Updates the ui to fit the right size.
|
||||
- (void)updateView:(CGFloat)size;
|
||||
|
||||
@optional
|
||||
|
||||
// Can setup ui here. Should be called in the initialization functions.
|
||||
- (void)setupView;
|
||||
|
||||
@end
|
||||
@ -1,46 +0,0 @@
|
||||
//
|
||||
// NSArray+MFConvenience.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by Scott Pfeil on 12/5/13.
|
||||
// Copyright (c) 2013 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
// Adds frequently used convenience methods to NSArray.
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface NSArray (MFConvenience)
|
||||
|
||||
// Gets the object from the array and verfies that it is of a given type.
|
||||
- (nullable id)objectAtIndex:(NSUInteger)index ofType:(nonnull Class)type;
|
||||
|
||||
// shorthand for objectAtIndex
|
||||
- (nullable NSString *)optionalStringAtIndex:(NSUInteger)index;
|
||||
- (nullable NSDictionary *)dictionaryAtIndex:(NSUInteger)index;
|
||||
- (nullable NSArray *)arrayAtIndex:(NSUInteger)index;
|
||||
- (BOOL)boolAtIndex:(NSUInteger)index;
|
||||
- (NSInteger)integerAtIndex:(NSUInteger)index;
|
||||
- (CGFloat)floatAtIndex:(NSUInteger)index;
|
||||
- (double)doubleAtIndex:(NSUInteger)index;
|
||||
|
||||
// Gets an object that is nested using a series of keys or indexes to reach it.
|
||||
// All keys should be of type NSString and is used for nested dictionaries.
|
||||
// All indexes should be of type NSNumber and is used for nested arrays.
|
||||
// Root object should be either a NSDictionary or NSArray.
|
||||
- (nullable id)objectChainOfIndexesOrKeys:(nonnull NSArray *)indexesOrKeys;
|
||||
|
||||
// Gets an object that is nested using a series of keys or indexes to reach it and verifies it is of a specific type.
|
||||
// See objectChainOfIndexesOrKeys
|
||||
- (nullable id)objectChainOfIndexesOrKeys:(nonnull NSArray *)indexesOrKeys ofType:(nonnull Class)type;
|
||||
|
||||
// Gets the string object at a given index. Returns empty string if object at index is not a valid string.
|
||||
- (nonnull NSString *)stringAtIndex:(NSUInteger)index;
|
||||
|
||||
// Maps this array to a new array of T objects given a conversion block. Objective-C implementation of Swift's map. https://developer.apple.com/documentation/swift/array/2908681-map
|
||||
- (nonnull NSArray *)map:(id _Nonnull (^_Nonnull)(id _Nonnull obj))mapBlock;
|
||||
- (nonnull NSArray *)filter:(BOOL (^_Nonnull)(id _Nonnull obj))block;
|
||||
- (nonnull id)reduce:(id _Nonnull)initial block:(id _Nonnull (^_Nonnull)(id _Nonnull obj1,id _Nonnull obj2))block;
|
||||
- (nonnull NSArray *)flatMap:(id _Nonnull (^_Nonnull)(id _Nonnull obj))block;
|
||||
|
||||
@end
|
||||
@ -1,16 +0,0 @@
|
||||
//
|
||||
// NSDecimalNumber+MFConvenience.h
|
||||
// mobilefirst
|
||||
//
|
||||
// Created by Yang, Tianhang (Chris) on 10/5/16.
|
||||
// Copyright © 2016 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface NSDecimalNumber (MFConvenience)
|
||||
|
||||
//function to prevent iphone 5 crash when using default decimalNumberWithString function
|
||||
+ (nullable NSDecimalNumber *)mfDecimalNumberWithString:(nullable NSString *)numberValue;
|
||||
|
||||
@end
|
||||
@ -1,70 +0,0 @@
|
||||
//
|
||||
// NSNSDictionary+Convenience.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by Scott Pfeil on 11/12/13.
|
||||
// Copyright (c) 2013 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
// Adds frequently used convenience methods to NSDictionary.
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface NSDictionary (MFConvenience)
|
||||
|
||||
// Gets the object from the dictionary and verfies that it is of a given type.
|
||||
- (nullable id)objectForKey:(nonnull id<NSCopying>)key ofType:(nonnull Class)type;
|
||||
|
||||
// shorthand for objectForKey
|
||||
- (nullable NSString *)string:(nonnull id<NSCopying>)key;
|
||||
- (nullable id)dict:(nonnull id<NSCopying>)key;
|
||||
- (nullable id)array:(nonnull id<NSCopying>)key;
|
||||
- (BOOL)boolForKey:(nonnull id<NSCopying>)key;
|
||||
- (NSInteger)integer:(nonnull id<NSCopying>)key;
|
||||
- (CGFloat)floatForKey:(nonnull id<NSCopying>)key;
|
||||
- (double)doubleForKey:(nonnull id<NSCopying>)key;
|
||||
- (nullable NSNumber *)optionalNumberForKey:(nonnull id<NSCopying>)key;
|
||||
|
||||
// Not strict, can accept either string or boolean.
|
||||
- (BOOL)lenientBoolForKey:(nonnull id<NSCopying>)key;
|
||||
|
||||
// Gets an object that is nested using a series of keys or indexes to reach it.
|
||||
// All keys should be of type NSString and is used for nested dictionaries.
|
||||
// All indexes should be of type NSNumber and is used for nested arrays.
|
||||
// Root object should be either a NSDictionary or NSArray.
|
||||
- (nullable id)objectChainOfKeysOrIndexes:(nonnull NSArray *)keysOrIndexes;
|
||||
|
||||
// Gets an object that is nested using a series of keys or indexes to reach it and verifies it is of a specific type.
|
||||
// See objectChainOfKeysOrIndexes
|
||||
- (nullable id)objectChainOfKeysOrIndexes:(nonnull NSArray *)keysOrIndexes ofType:(nonnull Class)type;
|
||||
|
||||
// Returns array or nil
|
||||
// See objectChainOfKeysOrIndexes
|
||||
- (nullable NSArray *)arrayForChainOfKeysOrIndexes:(nonnull NSArray *)keysOrIndexes;
|
||||
|
||||
// Returns dictionary or nil.
|
||||
// See objectChainOfKeysOrIndexes
|
||||
- (nullable NSDictionary *)dictWithChainOfKeysOrIndexes:(nonnull NSArray *)keysOrIndexes;
|
||||
|
||||
// Returns a non-nil dictionary, Can be used if trying to add dictionary object to a dictionary or array
|
||||
// See objectChainOfKeysOrIndexes
|
||||
- (nonnull NSDictionary *)dictionaryWithChainOfKeysOrIndexes:(nonnull NSArray *)keysOrIndexes;
|
||||
|
||||
// Gets string that is nested using a series of keys or indexes to reach it.
|
||||
// See objectChainOfKeysOrIndexes
|
||||
- (nonnull NSString *)stringForChainOfKeysOrIndexes:(nonnull NSArray *)keysOrIndexes;
|
||||
|
||||
// Gets the string object for a given key. Returns empty string if object for key is not a valid string.
|
||||
- (nonnull NSString *)stringForKey:(nonnull NSString *)key;
|
||||
|
||||
// Gets the dictionary object for a given key. Returns empty dictionary if object for key is not a valid dictionary.
|
||||
- (nonnull NSDictionary *)dictionaryForKey:(nonnull NSString *)key;
|
||||
|
||||
// Gets the array object for a given key. Returns empty array if object for key is not a valid array.
|
||||
- (nonnull NSArray *)arrayForKey:(nonnull NSString *)key;
|
||||
|
||||
// Gets bool that is nested using a series of keys or indexes to reach it.
|
||||
// See objectChainOfKeysOrIndexes
|
||||
- (BOOL)boolForChainOfKeysOrIndexes:(nonnull NSArray *)keysOrIndexes;
|
||||
|
||||
@end
|
||||
@ -1,15 +0,0 @@
|
||||
//
|
||||
// UIFont+UIFont_Spacing.h
|
||||
// mobilefirst
|
||||
//
|
||||
// Created by Yang, Tianhang (Chris) on 7/19/17.
|
||||
// Copyright © 2017 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface UIFont (MFSpacing)
|
||||
|
||||
- (nonnull UIFont *)monospacedDigitFont;
|
||||
|
||||
@end
|
||||
@ -1,15 +0,0 @@
|
||||
//
|
||||
// UILabel+MFCustom.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by Chris Yang on 2/1/16.
|
||||
// Copyright © 2016 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface UILabel (MFCustom)
|
||||
|
||||
- (CGRect)boundingRectForCharacterRange:(NSRange)range;
|
||||
|
||||
@end
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,11 +0,0 @@
|
||||
framework module MVMCore {
|
||||
umbrella header "MVMCore.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
||||
|
||||
module MVMCore.Swift {
|
||||
header "MVMCore-Swift.h"
|
||||
requires objc
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,15 +0,0 @@
|
||||
{
|
||||
"statusCode": 200,
|
||||
"message": "Success",
|
||||
"vidToken": "OAlTpG0WFQ_qKHdnjBQueUB_SjZk46rjTGxxSGppKd8=",
|
||||
"sdAuthResp": [
|
||||
{
|
||||
"urlId": "1",
|
||||
"authRespCode": 1200,
|
||||
"httpsProxyIP": "152.198.7.159",
|
||||
"sdPort": 22779,
|
||||
"sdUrl": "mobile-eqa6.vzw.com:443?vzSvc=OAlTpG0WFQ_qKHdnjBQueUB_SjZk46rjTGxxSGppKd8=&vispVzKey=44595039&vispIconFg=1&vispUsr=44595039:sNNHcJP2nYGtcuiCaVZcHQ==&vispAuthSid=CIAAACAKJwE&vispExpTime=1511370770&vispAuthKey=25858536&vispAuthSign=0.19._y9flLw7123TMhTcHUe7IVUmzJZK4MhC5kC3A6FTvXw",
|
||||
"sdConfExpiry": 1512370770
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,28 +0,0 @@
|
||||
{
|
||||
"FreeBeeRollout": {
|
||||
"ResponseInfo": {
|
||||
"locale": "EN",
|
||||
"type": "Success",
|
||||
"code": "00000",
|
||||
"message": "0",
|
||||
"userMessage": "0"
|
||||
},
|
||||
"authRequestTimeOut": "1",
|
||||
"freeBeeEnabled": "Y",
|
||||
"freeBeeData": {
|
||||
"campaignToken": "CIAAIYAKqAE",
|
||||
"authUrls": [
|
||||
{
|
||||
"urlId": "1",
|
||||
"authUrl": "mobile-eqa6.vzw.com:443"
|
||||
}
|
||||
]
|
||||
},
|
||||
"disabledModules": ["gridwall"
|
||||
],
|
||||
"enabledPages": ["billOverview","myData","accountLanding", "deviceLanding"
|
||||
],
|
||||
|
||||
"proxyServerUrl": "https://auth.svcs.verizon.com:22790/sd/v2/sdAuthorization/httpsProxy"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@ -1,17 +0,0 @@
|
||||
//
|
||||
// ButtonDelegateProtocol.h
|
||||
// mobilefirst
|
||||
//
|
||||
// Created by Scott Pfeil on 2/25/16.
|
||||
// Copyright © 2016 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
#import <MVMCoreUI/MFButtonProtocol.h>
|
||||
|
||||
@protocol ButtonDelegateProtocol <NSObject>
|
||||
|
||||
@optional
|
||||
|
||||
// Called when the entered text becomes valid based on the validation block
|
||||
- (BOOL)button:(nonnull NSObject <MFButtonProtocol> *)button shouldPerformActionWithMap:(nullable NSDictionary *)actionMap additionalData:(nullable NSDictionary *)additionalData;
|
||||
|
||||
@end
|
||||
@ -1,84 +0,0 @@
|
||||
//
|
||||
// FLAnimatedImage.h
|
||||
// Flipboard
|
||||
//
|
||||
// Created by Raphael Schaad on 7/8/13.
|
||||
// Copyright (c) 2013-2015 Flipboard. All rights reserved.
|
||||
//
|
||||
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
// Allow user classes conveniently just importing one header.
|
||||
#import <MVMCoreUI/FLAnimatedImageView.h>
|
||||
|
||||
|
||||
#ifndef NS_DESIGNATED_INITIALIZER
|
||||
#if __has_attribute(objc_designated_initializer)
|
||||
#define NS_DESIGNATED_INITIALIZER __attribute((objc_designated_initializer))
|
||||
#else
|
||||
#define NS_DESIGNATED_INITIALIZER
|
||||
#endif
|
||||
#endif
|
||||
|
||||
extern const NSTimeInterval kFLAnimatedImageDelayTimeIntervalMinimum;
|
||||
|
||||
//
|
||||
// An `FLAnimatedImage`'s job is to deliver frames in a highly performant way and works in conjunction with `FLAnimatedImageView`.
|
||||
// It subclasses `NSObject` and not `UIImage` because it's only an "image" in the sense that a sea lion is a lion.
|
||||
// It tries to intelligently choose the frame cache size depending on the image and memory situation with the goal to lower CPU usage for smaller ones, lower memory usage for larger ones and always deliver frames for high performant play-back.
|
||||
// Note: `posterImage`, `size`, `loopCount`, `delayTimes` and `frameCount` don't change after successful initialization.
|
||||
//
|
||||
@interface FLAnimatedImage : NSObject
|
||||
|
||||
@property (nonatomic, strong, readonly) UIImage *posterImage; // Guaranteed to be loaded; usually equivalent to `-imageLazilyCachedAtIndex:0`
|
||||
@property (nonatomic, assign, readonly) CGSize size; // The `.posterImage`'s `.size`
|
||||
|
||||
@property (nonatomic, assign, readonly) NSUInteger loopCount; // 0 means repeating the animation indefinitely
|
||||
@property (nonatomic, strong, readonly) NSDictionary *delayTimesForIndexes; // Of type `NSTimeInterval` boxed in `NSNumber`s
|
||||
@property (nonatomic, assign, readonly) NSUInteger frameCount; // Number of valid frames; equal to `[.delayTimes count]`
|
||||
|
||||
@property (nonatomic, assign, readonly) NSUInteger frameCacheSizeCurrent; // Current size of intelligently chosen buffer window; can range in the interval [1..frameCount]
|
||||
@property (nonatomic, assign) NSUInteger frameCacheSizeMax; // Allow to cap the cache size; 0 means no specific limit (default)
|
||||
|
||||
// Intended to be called from main thread synchronously; will return immediately.
|
||||
// If the result isn't cached, will return `nil`; the caller should then pause playback, not increment frame counter and keep polling.
|
||||
// After an initial loading time, depending on `frameCacheSize`, frames should be available immediately from the cache.
|
||||
- (UIImage *)imageLazilyCachedAtIndex:(NSUInteger)index;
|
||||
|
||||
// Pass either a `UIImage` or an `FLAnimatedImage` and get back its size
|
||||
+ (CGSize)sizeForImage:(id)image;
|
||||
|
||||
// On success, the initializers return an `FLAnimatedImage` with all fields initialized, on failure they return `nil` and an error will be logged.
|
||||
- (instancetype)initWithAnimatedGIFData:(NSData *)data;
|
||||
// Pass 0 for optimalFrameCacheSize to get the default, predrawing is enabled by default.
|
||||
- (instancetype)initWithAnimatedGIFData:(NSData *)data optimalFrameCacheSize:(NSUInteger)optimalFrameCacheSize predrawingEnabled:(BOOL)isPredrawingEnabled NS_DESIGNATED_INITIALIZER;
|
||||
+ (instancetype)animatedImageWithGIFData:(NSData *)data;
|
||||
|
||||
@property (nonatomic, strong, readonly) NSData *data; // The data the receiver was initialized with; read-only
|
||||
|
||||
@end
|
||||
|
||||
typedef NS_ENUM(NSUInteger, FLLogLevel) {
|
||||
FLLogLevelNone = 0,
|
||||
FLLogLevelError,
|
||||
FLLogLevelWarn,
|
||||
FLLogLevelInfo,
|
||||
FLLogLevelDebug,
|
||||
FLLogLevelVerbose
|
||||
};
|
||||
|
||||
@interface FLAnimatedImage (Logging)
|
||||
|
||||
+ (void)setLogBlock:(void (^)(NSString *logString, FLLogLevel logLevel))logBlock logLevel:(FLLogLevel)logLevel;
|
||||
+ (void)logStringFromBlock:(NSString *(^)(void))stringBlock withLevel:(FLLogLevel)level;
|
||||
|
||||
@end
|
||||
|
||||
#define FLLog(logLevel, format, ...) [FLAnimatedImage logStringFromBlock:^NSString *{ return [NSString stringWithFormat:(format), ## __VA_ARGS__]; } withLevel:(logLevel)]
|
||||
|
||||
@interface FLWeakProxy : NSProxy
|
||||
|
||||
+ (instancetype)weakProxyForObject:(id)targetObject;
|
||||
|
||||
@end
|
||||
@ -1,36 +0,0 @@
|
||||
//
|
||||
// FLAnimatedImageView.h
|
||||
// Flipboard
|
||||
//
|
||||
// Created by Raphael Schaad on 7/8/13.
|
||||
// Copyright (c) 2013-2015 Flipboard. All rights reserved.
|
||||
//
|
||||
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@class FLAnimatedImage;
|
||||
@protocol FLAnimatedImageViewDebugDelegate;
|
||||
|
||||
|
||||
//
|
||||
// An `FLAnimatedImageView` can take an `FLAnimatedImage` and plays it automatically when in view hierarchy and stops when removed.
|
||||
// The animation can also be controlled with the `UIImageView` methods `-start/stop/isAnimating`.
|
||||
// It is a fully compatible `UIImageView` subclass and can be used as a drop-in component to work with existing code paths expecting to display a `UIImage`.
|
||||
// Under the hood it uses a `CADisplayLink` for playback, which can be inspected with `currentFrame` & `currentFrameIndex`.
|
||||
//
|
||||
@interface FLAnimatedImageView : UIImageView
|
||||
|
||||
// Setting `[UIImageView.image]` to a non-`nil` value clears out existing `animatedImage`.
|
||||
// And vice versa, setting `animatedImage` will initially populate the `[UIImageView.image]` to its `posterImage` and then start animating and hold `currentFrame`.
|
||||
@property (nonatomic, strong) FLAnimatedImage *animatedImage;
|
||||
@property (nonatomic, copy) void(^loopCompletionBlock)(NSUInteger loopCountRemaining);
|
||||
|
||||
@property (nonatomic, strong, readonly) UIImage *currentFrame;
|
||||
@property (nonatomic, assign, readonly) NSUInteger currentFrameIndex;
|
||||
|
||||
// The animation runloop mode. Enables playback during scrolling by allowing timer events (i.e. animation) with NSRunLoopCommonModes.
|
||||
// To keep scrolling smooth on single-core devices such as iPhone 3GS/4 and iPod Touch 4th gen, the default run loop mode is NSDefaultRunLoopMode. Otherwise, the default is NSDefaultRunLoopMode.
|
||||
@property (nonatomic, copy) NSString *runLoopMode;
|
||||
|
||||
@end
|
||||
@ -1,18 +0,0 @@
|
||||
//
|
||||
// LabelView.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by Scott Pfeil on 12/11/15.
|
||||
// Copyright © 2015 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <MVMCoreUI/ViewConstrainingView.h>
|
||||
@class Label;
|
||||
|
||||
@interface LabelView : ViewConstrainingView
|
||||
|
||||
// Customize the label.
|
||||
@property (nullable, weak, nonatomic) Label *label;
|
||||
|
||||
@end
|
||||
@ -1,12 +0,0 @@
|
||||
//
|
||||
// MFButtonProtocol.h
|
||||
// mobilefirst
|
||||
//
|
||||
// Created by Yang, Tianhang (Chris) on 2/14/18.
|
||||
// Copyright © 2018 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
|
||||
@protocol MFButtonProtocol <NSObject>
|
||||
|
||||
@end
|
||||
@ -1,46 +0,0 @@
|
||||
//
|
||||
// UIButton+Custom.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by kamlesh on 1/8/15.
|
||||
// Copyright (c) 2015 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
@import MVMCore.MVMCoreActionDelegateProtocol;
|
||||
#import <MVMCoreUI/ButtonDelegateProtocol.h>
|
||||
#import <MVMCoreUI/MFButtonProtocol.h>
|
||||
#import <MVMCoreUI/MVMCoreUIMoleculeViewProtocol.h>
|
||||
@class DelegateObject;
|
||||
|
||||
typedef void (^ButtonTapBlock)(id _Nonnull sender);
|
||||
|
||||
extern CGFloat const CloseButtonHeight;
|
||||
extern CGFloat const CloseButtonWidth;
|
||||
|
||||
@interface MFCustomButton : UIButton <MFButtonProtocol>
|
||||
|
||||
@property (nullable, nonatomic, strong) NSDictionary *actionMap;
|
||||
@property (nullable, nonatomic, weak) id <ButtonDelegateProtocol> buttonDelegate;
|
||||
@property (nullable, nonatomic, strong) NSLayoutConstraint *heightConstraint;
|
||||
|
||||
// Adds a block to a button so it calls the block when pressed.
|
||||
- (void)addBlock:(nonnull ButtonTapBlock)buttonTapBlock forControlEvents:(UIControlEvents)event;
|
||||
|
||||
// Sets up the button with the passed in action map. Will set the title and set the action to use the action handler.
|
||||
- (void)setWithActionMap:(nullable NSDictionary *)actionMap delegateObject:(nullable DelegateObject *)delegateObject additionalData:(nullable NSDictionary *)additionalData;
|
||||
|
||||
//accessibility
|
||||
- (void)addAccessibilityForCameraControl;
|
||||
|
||||
- (nonnull UIAccessibilityCustomAction *)accessibilityCustomAction;
|
||||
|
||||
#pragma mark - Deprecated
|
||||
|
||||
// Sets up the button with the passed in action map. Will set the title and set the action to use the action handler.
|
||||
- (void)setWithActionMap:(nullable NSDictionary *)actionMap delegate:(nullable NSObject <MVMCoreActionDelegateProtocol>*)delegate additionalData:(nullable NSDictionary *)additionalData __deprecated;
|
||||
|
||||
// Sets up the button with the passed in action map. Will set the title and set the action to use the action handler. Also pass in the button delegate
|
||||
- (void)setWithActionMap:(nullable NSDictionary *)actionMap actionDelegate:(nullable NSObject <MVMCoreActionDelegateProtocol>*)actionDelegate additionalData:(nullable NSDictionary *)additionalData buttonDelegate:(nullable id <ButtonDelegateProtocol>)buttonDelegate __deprecated;
|
||||
|
||||
@end
|
||||
@ -1,28 +0,0 @@
|
||||
//
|
||||
// MFDigitTextBox.h
|
||||
// mobilefirst
|
||||
//
|
||||
// Created by Scott Pfeil on 1/17/17.
|
||||
// Copyright © 2017 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <MVMCoreUI/MFView.h>
|
||||
|
||||
@protocol MFDigitTextBoxDelegate <NSObject>
|
||||
@optional
|
||||
- (void)textFieldDidDelete:(UITextField *)textField;
|
||||
@end
|
||||
|
||||
@interface MFDigitTextBox : UITextField <MVMCoreViewProtocol>
|
||||
|
||||
@property (nonatomic, assign) id<MFDigitTextBoxDelegate> mfTextBoxDelegate;
|
||||
|
||||
// Updates the ui to fit the right size.
|
||||
- (void)updateView:(CGFloat)size;
|
||||
|
||||
// Error handling
|
||||
- (void)setAsError;
|
||||
- (void)hideError;
|
||||
|
||||
@end
|
||||
@ -1,22 +0,0 @@
|
||||
//
|
||||
// MFDigitTextField.h
|
||||
// mobilefirst
|
||||
//
|
||||
// Created by Scott Pfeil on 12/5/16.
|
||||
// Copyright © 2016 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
#import <MVMCoreUI/MFTextField.h>
|
||||
|
||||
@class MFDigitTextBox;
|
||||
@interface MFDigitTextField : MFTextField
|
||||
|
||||
+ (nullable instancetype)mfDigitTextFieldWithNumberOfDigits:(NSUInteger)numberOfDigits;
|
||||
+ (nullable instancetype)mfDigitTextFieldWithNumberOfDigits:(NSUInteger)numberOfDigits withBothDelegates:(nullable id<UITextFieldDelegate, MFTextFieldDelegate>)delegate;
|
||||
+ (nullable instancetype)mfDigitTextFieldWithNumberOfDigits:(NSUInteger)numberOfDigits withBothDelegates:(nullable id<UITextFieldDelegate, MFTextFieldDelegate>)delegate size:(CGFloat)size;
|
||||
|
||||
- (void)setAsSecureTextEntry:(BOOL)secureTextEntry;
|
||||
|
||||
@property (nullable, nonatomic, strong) NSArray <MFDigitTextBox *>*textFields;
|
||||
//Be careful when using this directly. There's a possiblity that you may break the view.
|
||||
@end
|
||||
@ -1,20 +0,0 @@
|
||||
//
|
||||
// MVMFonts.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by Scott Pfeil on 11/17/14.
|
||||
// Copyright (c) 2014 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
// Commonly used mvm fonts
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface MFFonts : NSObject
|
||||
|
||||
+ (nullable UIFont *)mfFont75Bd:(CGFloat)size;
|
||||
+ (nullable UIFont *)mfFont55Rg:(CGFloat)size;
|
||||
+ (nullable UIFont *)mfFontOcratxt:(CGFloat)size;
|
||||
+ (nullable UIFont *)mfFontWithName:(nonnull NSString *)name size:(CGFloat)size;
|
||||
|
||||
@end
|
||||
@ -1,28 +0,0 @@
|
||||
//
|
||||
// MFLoadingSpinner.h
|
||||
// mobilefirst
|
||||
//
|
||||
// Created by Wesolowski, Brendan on 3/10/16.
|
||||
// Copyright © 2016 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface MFLoadingSpinner : UIView
|
||||
|
||||
-(void)setUpCircle;
|
||||
|
||||
-(void)setUpCircle:(nullable UIColor *)strokeColor;
|
||||
|
||||
-(void)changeColor:(nullable UIColor *)strokeColor;
|
||||
|
||||
- (void)pauseSpinner;
|
||||
|
||||
- (void)resumeSpinner;
|
||||
|
||||
// Starts the spinner after a slight delay.
|
||||
- (void)resumeSpinnerAfterDelay;
|
||||
|
||||
- (nullable NSDictionary *)pinWidthAndHeight;
|
||||
|
||||
@end
|
||||
@ -1,15 +0,0 @@
|
||||
//
|
||||
// MFLoadingViewController.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by Scott Pfeil on 11/20/14.
|
||||
// Copyright (c) 2014 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
// The view controller used during loading. Used by the loading handler.
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
@import MVMCore.MVMCoreLoadingViewControllerProtocol;
|
||||
|
||||
@interface MFLoadingViewController : UIViewController <MVMCoreLoadingViewControllerProtocol>
|
||||
|
||||
@end
|
||||
@ -1,37 +0,0 @@
|
||||
//
|
||||
// MFMdnTextField.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by ShaunH on 2/23/15.
|
||||
// Copyright (c) 2015 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <AddressBookUI/AddressBookUI.h>
|
||||
#import <ContactsUI/ContactsUI.h>
|
||||
#import <MVMCoreUI/MFTextField.h>
|
||||
|
||||
@interface MFMdnTextField : MFTextField <UITextFieldDelegate, ABPeoplePickerNavigationControllerDelegate, CNContactPickerDelegate>
|
||||
|
||||
@property (nullable, nonatomic, weak) IBOutlet id<UITextFieldDelegate> customDelegate;
|
||||
@property (nonatomic) BOOL isNationalMdn;
|
||||
@property (nonatomic) BOOL shouldValidateMDN;
|
||||
|
||||
- (void)setupTextfield;
|
||||
|
||||
// valid if 0 or correct national or international mdn size+character
|
||||
- (BOOL)hasValidMdn;
|
||||
|
||||
// return hasValidMdn and color text accordingly
|
||||
- (BOOL)validateAndColor;
|
||||
|
||||
// return customiz error message
|
||||
- (nullable NSString *)getErrorMessage;
|
||||
|
||||
// return unformated mdn
|
||||
- (nullable NSString *)getMdn;
|
||||
|
||||
// format mdn and set to self.text
|
||||
- (void)setMdn:(nullable NSString *)mdn;
|
||||
|
||||
@end
|
||||
@ -1,27 +0,0 @@
|
||||
//
|
||||
// MFProgrammaticTableViewController.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by Scott Pfeil on 12/17/14.
|
||||
// Copyright (c) 2014 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
// Table view property and scrollview property is the same.
|
||||
|
||||
#import <MVMCoreUI/MFScrollingViewController.h>
|
||||
|
||||
@interface MFProgrammaticTableViewController : MFScrollingViewController <UITableViewDelegate, UITableViewDataSource>
|
||||
|
||||
@property (nullable, weak, nonatomic) UITableView *tableView;
|
||||
@property (nullable, nonatomic, strong) NSLayoutConstraint *topConstraint;
|
||||
@property (nullable, nonatomic, strong) NSLayoutConstraint *bottomConstraint;
|
||||
|
||||
// Registers classes and nibs. Can subclass for different nibs. Can call super and then add new ones after as well.
|
||||
- (void)registerWithTable;
|
||||
|
||||
// This class should create the table view that will be used here. Subclass this for different table styles.
|
||||
- (nonnull UITableView *)createTableView;
|
||||
|
||||
// Sets the table to have no section headers or footers.
|
||||
- (void)setToHaveNoSectionHeadersFooters;
|
||||
|
||||
@end
|
||||
@ -1,89 +0,0 @@
|
||||
//
|
||||
// MFRadioButton.h
|
||||
// MobileFirstFramework
|
||||
//
|
||||
// Created by Seshamani, Shreyas on 12/14/17.
|
||||
// Copyright © 2017 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <MVMCore/MVMCoreViewProtocol.h>
|
||||
|
||||
|
||||
typedef enum : NSUInteger {
|
||||
ButtonSizeSmall,//24
|
||||
ButtonSizeSmall1,//30
|
||||
ButtonSizeSmall2,//36
|
||||
ButtonSizeMedium,//48
|
||||
ButtonSizeLarge,//60
|
||||
ButtonSizeExtraLarge,//96
|
||||
} ButtonSize;
|
||||
|
||||
@interface MFRadioButton : UIView <MVMCoreViewProtocol>
|
||||
|
||||
|
||||
// THESE ARE JUST DUMMY APIS. They will be deleted later!!!!
|
||||
|
||||
typedef void (^PerformActionForRadioButton)(void);
|
||||
|
||||
/* perform action for accessibility action*/
|
||||
@property (nullable, copy, nonatomic) PerformActionForRadioButton performActionForCheck;
|
||||
typedef void (^CircleSelectedClosure)(_Nonnull id sender);
|
||||
|
||||
|
||||
@property (nonatomic, strong, nullable) UIColor* fillColor;
|
||||
@property (nonatomic, strong, nullable) UIColor* borderColor;
|
||||
@property (nonatomic) CGFloat circleBorderWidth;
|
||||
@property (nonatomic, copy, nullable) CircleSelectedClosure circleSelectedBlock;
|
||||
@property (nonatomic, copy, nullable) CircleSelectedClosure handleSelectionBlock;
|
||||
@property (nonatomic) CGFloat circleDiameter;
|
||||
@property (nonatomic, nullable, strong, readonly) CAShapeLayer * myCircle;
|
||||
|
||||
@property (nonatomic, strong, nullable) NSLayoutConstraint *heightConstraint;
|
||||
@property (nonatomic, strong, nullable) NSLayoutConstraint *widthConstraint;
|
||||
@property (nonatomic) BOOL respondsToTapGesture;
|
||||
@property (nonatomic, getter = isSelected) BOOL selected;
|
||||
|
||||
// Set line width manually
|
||||
- (void)setCheckMarkLineWidth:(CGFloat)lineWidth;
|
||||
|
||||
// Determine and set line width based on circle diameter
|
||||
- (void)calculateAndSetCheckMarkLineWidth;
|
||||
|
||||
- (void)setCheckMarkColor:(nullable UIColor *)color;
|
||||
|
||||
-(void)animateCheckMark;
|
||||
|
||||
-(void)drawCheckMarkWithoutAnimation;
|
||||
|
||||
-(void)animateSelect:(nullable UIColor *)fillColor BorderColor:(nullable UIColor *)borderColor;
|
||||
|
||||
- (void)addAccessibilityInformationIndex:(NSUInteger)index Total:(NSUInteger)totalCount;
|
||||
|
||||
#pragma mark - Convenience
|
||||
|
||||
/* Adds the border with the set border color and SelectableCircleBorderWidth */
|
||||
- (void)addBorder;
|
||||
|
||||
/* Removes the border */
|
||||
- (void)removeBorder;
|
||||
|
||||
/* Checks if the fill color is white*/
|
||||
- (BOOL)isFillColorWhite;
|
||||
|
||||
/* Resize the circle for animations */
|
||||
-(void)resize:(ButtonSize)newSize;
|
||||
|
||||
/* Deselect circle without calling blocks */
|
||||
- (void)cancelSelection;
|
||||
|
||||
/* Disable the outer view */
|
||||
- (void)disableState;
|
||||
|
||||
/* Enable outer view */
|
||||
- (void)enableState;
|
||||
|
||||
#pragma mark - Animation
|
||||
-(void)animateOutline:(nonnull UIColor *)strokeColor IsSelected:(BOOL)selected;
|
||||
|
||||
@end
|
||||
@ -1,52 +0,0 @@
|
||||
//
|
||||
// MFScrollingViewController.h
|
||||
// MobileFirstFramework
|
||||
//
|
||||
// Created by Pfeil, Scott Robert on 11/21/17.
|
||||
// Copyright © 2017 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
#import <MVMCoreUI/MFViewController.h>
|
||||
|
||||
@interface MFScrollingViewController : MFViewController <UIScrollViewDelegate>
|
||||
|
||||
@property (nullable, weak, nonatomic) IBOutlet UIScrollView *scrollView;
|
||||
@property (nullable, weak, nonatomic) IBOutlet UIView *contentView;
|
||||
|
||||
// Recognizes single tap/touches to screen for dismissing keyboard
|
||||
@property (nonnull, strong, nonatomic) UITapGestureRecognizer *dismissKeyboardTapGesture;
|
||||
|
||||
// For setting the width of the content to the size of the screen.
|
||||
@property (nullable, weak, nonatomic) IBOutlet NSLayoutConstraint *contentWidthConstraint;
|
||||
|
||||
// Boolean for if the keyboard is showing or now.
|
||||
@property (assign, nonatomic, readonly) BOOL keyboardIsShowing;
|
||||
|
||||
// Returns the rectangle to scroll to when the keyboard pops up.
|
||||
- (CGRect)rectToScrollToWhenKeyboardPopsUp;
|
||||
|
||||
// Registers for keyboard notifications
|
||||
- (void)registerForKeyboardNotifications;
|
||||
|
||||
// Unregisters for keyboard notifications
|
||||
- (void)unregisterForKeyboardNotifications;
|
||||
|
||||
// Called when the UIKeyboardDidShowNotification is sent. (Subclasses should call super)
|
||||
- (void)keyboardWillShow:(nonnull NSNotification *)notification;
|
||||
|
||||
// Called when the UIKeyboardWillHideNotification is sent. (Subclasses should call super)
|
||||
- (void)keyboardWillBeHidden:(nonnull NSNotification *)notification;
|
||||
|
||||
|
||||
// Returns if the scroll shoud flash on completion of animation in view. This is always true in the base class. Subclass to override.
|
||||
- (BOOL)isFlashScrollIndicatorAccesible;
|
||||
|
||||
- (void)pageAnimationEnded;
|
||||
|
||||
// Implement this to disable hand scroll Animation for View Controller. By Default it will be enabled
|
||||
- (BOOL)shouldEnableHandScrollAnimation;
|
||||
|
||||
// to stop hand scoll animation so subclases can stop in certain user actions
|
||||
- (void)stopHandScrollAnimation:(BOOL)animated;
|
||||
|
||||
@end
|
||||
@ -1,109 +0,0 @@
|
||||
//
|
||||
// MFSizeObject.h
|
||||
// mobilefirst
|
||||
//
|
||||
// Created by Scott Pfeil on 12/20/16.
|
||||
// Copyright © 2016 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <MVMCoreUI/MFSizeThreshold.h>
|
||||
|
||||
extern CGFloat const MFSizeiPhone4HeightThreshold;
|
||||
extern CGFloat const MFSizeiPhone5HeightThreshold;
|
||||
|
||||
extern CGFloat const MFSizeSmalliPhoneThreshold;
|
||||
extern CGFloat const MFSizeLargeiPhoneThreshold;
|
||||
extern CGFloat const MFSizeStandardiPadPortraitThreshold;
|
||||
extern CGFloat const MFSizeStandardiPadLandscapeThreshold;
|
||||
extern CGFloat const MFSizeiPadProLandscapeThreshold;
|
||||
|
||||
@interface MFSizeObject : NSObject
|
||||
|
||||
// Standard size
|
||||
@property (nonatomic) CGFloat standardSize;
|
||||
@property (nonatomic) BOOL scaleStandardSize;
|
||||
@property (nonatomic, strong, nullable) NSNumber *scaleStandardSizeBaseValue;
|
||||
@property (nonatomic, copy) void (^ _Nullable standardThresholdBlock)(void);
|
||||
|
||||
// Can be used to set the maximum size.
|
||||
@property (nonatomic) CGFloat maximumSize;
|
||||
|
||||
// returns value * (size/base)
|
||||
+ (CGFloat)getScaledValue:(CGFloat)value forSize:(CGFloat)size fromBase:(nullable NSNumber *)base;
|
||||
|
||||
#pragma mark - Size Initializers
|
||||
|
||||
+ (nullable instancetype)sizeObjectWithStandardSize:(CGFloat)standardSize;
|
||||
+ (nullable instancetype)sizeObjectWithScalingStandardSize:(CGFloat)standardSize;
|
||||
|
||||
// Convenience initializers.
|
||||
+ (nullable instancetype)sizeObjectWithStandardSize:(CGFloat)standardSize smalliPhoneSize:(CGFloat)smalliPhoneSize standardiPadPortraitSize:(CGFloat)standardiPadPortraitSize;
|
||||
+ (nullable instancetype)sizeObjectWithStandardSize:(CGFloat)standardSize standardiPadPortraitSize:(CGFloat)standardiPadPortraitSize;
|
||||
+ (nullable instancetype)sizeObjectWithStandardSize:(CGFloat)standardSize smalliPhoneSize:(CGFloat)smalliPhoneSize;
|
||||
+ (nullable instancetype)sizeObjectWithStandardSize:(CGFloat)standardSize standardiPadPortraitSize:(CGFloat)standardiPadPortraitSize iPadProLandscapeSize:(CGFloat)iPadProLandscapeSize;
|
||||
+ (nullable instancetype)sizeObjectWithStandardSize:(CGFloat)standardSize smalliPhoneSize:(CGFloat)smalliPhoneSize standardiPadPortraitSize:(CGFloat)standardiPadPortraitSize iPadProLandscapeSize:(CGFloat)iPadProLandscapeSize;
|
||||
|
||||
|
||||
#pragma mark - Block Initializers
|
||||
|
||||
+ (nullable instancetype)sizeObjectWithStandardSizeBlock:(nonnull void (^)(void))block;
|
||||
|
||||
// Convenience initializers.
|
||||
+ (nullable instancetype)sizeObjectWithStandardBlock:(nonnull void (^)(void))standardBlock smalliPhoneBlock:(nonnull void (^)(void))smalliPhoneBlock standardiPadPortraitBlock:(nonnull void (^)(void))standardiPadPortraitBlock;
|
||||
+ (nullable instancetype)sizeObjectWithStandardBlock:(nonnull void (^)(void))standardBlock standardiPadPortraitBlock:(nonnull void (^)(void))standardiPadPortraitBlock;
|
||||
+ (nullable instancetype)sizeObjectWithStandardBlock:(nonnull void (^)(void))standardBlock smalliPhoneBlock:(nonnull void (^)(void))smalliPhoneBlock;
|
||||
+ (nullable instancetype)sizeObjectWithStandardBlock:(nonnull void (^)(void))standardBlock standardiPadPortraitBlock:(nonnull void (^)(void))standardiPadPortraitBlock iPadProLandscapeBlock:(nonnull void (^)(void))iPadProLandscapeBlock;
|
||||
+ (nullable instancetype)sizeObjectWithStandardBlock:(nonnull void (^)(void))standardBlock smalliPhoneBlock:(nonnull void (^)(void))smalliPhoneBlock standardiPadPortraitBlock:(nonnull void (^)(void))standardiPadPortraitBlock iPadProLandscapeBlock:(nonnull void (^)(void))iPadProLandscapeBlock;
|
||||
|
||||
#pragma mark - Size Getters
|
||||
|
||||
// Returns the value for the appropriate size threshold
|
||||
- (CGFloat)getValueBasedOnScreenSize;
|
||||
- (CGFloat)getValueBasedOnDetailWidth;
|
||||
- (CGFloat)getValueBasedOnApplicationWidth;
|
||||
- (CGFloat)getValueBasedOnScreenHeight;
|
||||
- (CGFloat)getValueBasedOnSize:(CGFloat)size;
|
||||
|
||||
#pragma mark - Block performers
|
||||
|
||||
// Performs a block for the given sizes.
|
||||
- (void)performBlockBaseOnScreenSize;
|
||||
- (void)performBlockBaseOnDetailWidth;
|
||||
- (void)performBlockBaseOnApplicationWidth;
|
||||
- (void)performBlockBaseOnScreenHeight;
|
||||
- (void)performBlockBaseOnSize:(CGFloat)size;
|
||||
|
||||
#pragma mark - Add size thresholds
|
||||
|
||||
// Can add custom thresholds and sizes.
|
||||
- (void)addCustomSize:(nullable MFSizeThreshold *)sizeThreshold;
|
||||
- (void)addCustomSize:(CGFloat)size forThreshold:(CGFloat)threshold compareDirection:(MFSizeCompareDirection)compareDirection;
|
||||
|
||||
// Common directions
|
||||
- (void)addLargerThanCustomSize:(CGFloat)size forThreshold:(CGFloat)threshold;
|
||||
- (void)addSmallerThanCustomSize:(CGFloat)size forThreshold:(CGFloat)threshold;
|
||||
- (void)addScalingLargerThanCustomSize:(CGFloat)size forThreshold:(CGFloat)threshold;
|
||||
- (void)addScalingSmallerThanCustomSize:(CGFloat)size forThreshold:(CGFloat)threshold;
|
||||
|
||||
// Common thresholds
|
||||
- (void)addSizeForSmalliPhoneThreshold:(CGFloat)size;
|
||||
- (void)addSizeForStandardiPadPortaitThreshold:(CGFloat)size;
|
||||
- (void)addSizeForiPadProLandscapeThreshold:(CGFloat)size;
|
||||
|
||||
#pragma mark - Add block thresholds
|
||||
|
||||
- (void)addCustomThreshold:(CGFloat)threshold compareDirection:(MFSizeCompareDirection)compareDirection block:(nonnull void (^)(void))block;
|
||||
|
||||
// Common directions
|
||||
- (void)addLargerThanCustomThreshold:(CGFloat)threshold block:(nonnull void (^)(void))block;
|
||||
- (void)addSmallerThanCustomThreshold:(CGFloat)threshold block:(nonnull void (^)(void))block;
|
||||
- (void)addScalingLargerThanCustomThreshold:(CGFloat)threshold block:(nonnull void (^)(void))block;
|
||||
- (void)addScalingSmallerThanCustomThreshold:(CGFloat)threshold block:(nonnull void (^)(void))block;
|
||||
|
||||
// Common thresholds
|
||||
- (void)addBlockForSmalliPhoneThreshold:(nonnull void (^)(void))block;
|
||||
- (void)addBlockForStandardiPadPortaitThreshold:(nonnull void (^)(void))block;
|
||||
- (void)addBlockForiPadProLandscapeThreshold:(nonnull void (^)(void))block;
|
||||
|
||||
@end
|
||||
@ -1,56 +0,0 @@
|
||||
//
|
||||
// MFSizeThreshold.h
|
||||
// mobilefirst
|
||||
//
|
||||
// Created by Scott Pfeil on 1/31/17.
|
||||
// Copyright © 2017 Verizon Wireless Inc. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <CoreGraphics/CoreGraphics.h>
|
||||
|
||||
typedef NS_ENUM(NSInteger, MFSizeCompareDirection) {
|
||||
MFSizeGreaterThan = 0,
|
||||
MFSizeLessThan = 1
|
||||
};
|
||||
|
||||
@interface MFSizeThreshold : NSObject
|
||||
|
||||
@property (nonatomic) CGFloat size;
|
||||
@property (nonatomic) CGFloat threshold;
|
||||
@property (nonatomic) MFSizeCompareDirection direction;
|
||||
@property (nonatomic) BOOL scale;
|
||||
@property (nonatomic, strong, nullable) NSNumber *scaleBaseValue;
|
||||
@property (nonatomic, copy) void (^ _Nullable thresholdBlock)(void);
|
||||
|
||||
- (CGFloat)getValueForSizeScalingIfNeeded:(CGFloat)size;
|
||||
|
||||
#pragma mark - Size Initializers
|
||||
|
||||
// For getting a size based on threshold
|
||||
- (nullable instancetype)initWithSize:(CGFloat)size forThreshold:(CGFloat)threshold compareDirection:(MFSizeCompareDirection)compareDirection;
|
||||
- (nullable instancetype)initWithSize:(CGFloat)size forThreshold:(CGFloat)threshold compareDirection:(MFSizeCompareDirection)compareDirection scaleBasedOnScreenSize:(BOOL)scaleBasedOnScreenSize;
|
||||
|
||||
#pragma mark - Block Initializers
|
||||
|
||||
// For performing a block based on threshold
|
||||
- (nullable instancetype)initWithThreshold:(CGFloat)threshold compareDirection:(MFSizeCompareDirection)compareDirection block:(nonnull void (^)(void))thresholdBlock;
|
||||
- (nullable instancetype)initWithThreshold:(CGFloat)threshold compareDirection:(MFSizeCompareDirection)compareDirection scaleBasedOnScreenSize:(BOOL)scaleBasedOnScreenSize block:(nonnull void (^)(void))thresholdBlock;
|
||||
|
||||
#pragma mark - Common Size Getters
|
||||
|
||||
// Convenience functions to return common threshold pairings.
|
||||
+ (nullable instancetype)largerThanCustomSize:(CGFloat)size forThreshold:(CGFloat)threshold;
|
||||
+ (nullable instancetype)smallerThanCustomSize:(CGFloat)size forThreshold:(CGFloat)threshold;
|
||||
+ (nullable instancetype)scalingLargerThanCustomSize:(CGFloat)size forThreshold:(CGFloat)threshold;
|
||||
+ (nullable instancetype)scalingSmallerThanCustomSize:(CGFloat)size forThreshold:(CGFloat)threshold;
|
||||
|
||||
#pragma mark - Common Block Getters
|
||||
|
||||
// Convenience functions to return common threshold pairings.
|
||||
+ (nullable instancetype)largerThanCustomThreshold:(CGFloat)threshold block:(nonnull void (^)(void))thresholdBlock;
|
||||
+ (nullable instancetype)smallerThanCustomThreshold:(CGFloat)threshold block:(nonnull void (^)(void))thresholdBlock;
|
||||
+ (nullable instancetype)scalingLargerThanCustomThreshold:(CGFloat)threshold block:(nonnull void (^)(void))thresholdBlock;
|
||||
+ (nullable instancetype)scalingSmallerThanCustomThreshold:(CGFloat)threshold block:(nonnull void (^)(void))thresholdBlock;
|
||||
|
||||
@end
|
||||
@ -1,299 +0,0 @@
|
||||
//
|
||||
// MFStyler.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by Scott Pfeil on 11/26/14.
|
||||
// Copyright (c) 2014 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
// Styles for mobile first.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
@class LabelWithInternalButton;
|
||||
@class MFSizeObject;
|
||||
|
||||
//enum for border
|
||||
typedef NS_ENUM(NSInteger, MFViewBorder){
|
||||
MFViewBorderTop,
|
||||
MFViewBorderLeft,
|
||||
MFViewBorderBottom,
|
||||
MFViewBorderRight
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSUInteger, MFTimeFormatUnit) {
|
||||
MFTimeFormatColon = 0, /*!{days} : {hour} : {minutes} : {seconds} */
|
||||
MFTimeFormatNormal /* will end with days hours minutes seconds, when left days less than 2, it will change to 'day'*/
|
||||
};
|
||||
|
||||
// Some standard spacings. Use these to stay consistent across the app.
|
||||
extern CGFloat const PaddingDefault;
|
||||
extern CGFloat const PaddingDefaultHorizontalSpacing;
|
||||
extern CGFloat const PaddingDefaultVerticalSpacing;
|
||||
extern CGFloat const PaddingBetweenFields;
|
||||
extern CGFloat const PaddingHorizontalHeadlineWhiteView;
|
||||
extern CGFloat const PaddingHorizontalLarge;
|
||||
extern CGFloat const PaddingVerticalWhiteGrayView;
|
||||
extern CGFloat const PaddingVerticalHeadlineAlternate;
|
||||
extern CGFloat const PaddingPrimaryButtonTop;
|
||||
|
||||
// These are based on the multiple of 6 rule
|
||||
extern CGFloat const PaddingOne;
|
||||
extern CGFloat const PaddingTwo;
|
||||
extern CGFloat const PaddingThree;
|
||||
extern CGFloat const PaddingFour;
|
||||
extern CGFloat const PaddingFive;
|
||||
extern CGFloat const PaddingSix;
|
||||
extern CGFloat const PaddingSeven;
|
||||
extern CGFloat const PaddingEight;
|
||||
extern CGFloat const PaddingNine;
|
||||
extern CGFloat const PaddingTen;
|
||||
extern CGFloat const TableCellParagraphSpace;
|
||||
extern CGFloat const FooterLabelParagraphSpace;
|
||||
extern CGFloat const WebViewInset;
|
||||
|
||||
extern CGFloat const HeightTableSeperatorHeight;
|
||||
|
||||
extern CGFloat const MFHeightForSwitch;
|
||||
extern CGFloat const MFMFWidthForSwitch;
|
||||
|
||||
// Color constants
|
||||
extern CGFloat const DisableOppacity;
|
||||
extern CGFloat const PaymentMethodViewHeightWidthMultiplier;
|
||||
extern CGFloat const MinCellHeight;
|
||||
extern CGFloat const HeightIphone5;
|
||||
extern CGFloat const DefaultOptionCellHeight;
|
||||
extern CGFloat const LabelWithInternalButtonLineSpace;
|
||||
extern CGFloat const PromoViewHeight;
|
||||
|
||||
@interface MFStyler : NSObject
|
||||
|
||||
|
||||
// RoundedButtons
|
||||
/**********Style Guidelines for BrandRefresh: *********
|
||||
|
||||
H1 -> HeadlineLarge
|
||||
H2 -> Headline
|
||||
H3 -> SubHead
|
||||
B1 -> SubTitle
|
||||
B2 -> Body
|
||||
B3 -> Legal
|
||||
|
||||
*****************************************************/
|
||||
|
||||
|
||||
// Generic scaling based on the detail width.
|
||||
+ (nullable MFSizeObject *)sizeObjectGenericForCurrentDevice:(CGFloat)size;
|
||||
+ (CGFloat)sizeFontGenericForCurrentDevice:(CGFloat)size;
|
||||
|
||||
#pragma mark - Spacing Defaults
|
||||
+ (CGFloat)defaultHorizontalPaddingForApplicationWidth;
|
||||
+ (CGFloat)defaultVerticalPaddingForApplicationWidth;
|
||||
+ (CGFloat)defaultHorizontalPaddingForSize:(CGFloat)size;
|
||||
+ (CGFloat)defaultVerticalPaddingForSize:(CGFloat)size;
|
||||
+ (void)setDefaultMarginsForView:(nullable UIView *)view size:(CGFloat)size;
|
||||
+ (void)setDefaultMarginsForView:(nullable UIView *)view size:(CGFloat)size horizontal:(BOOL)horizontal vertical:(BOOL)vertical;
|
||||
|
||||
//-------------------------------------------------
|
||||
// Returns the fonts for these styles. Scales them as needed by default
|
||||
#pragma mark - 2.0 fonts
|
||||
|
||||
//75Bd 40pt
|
||||
+ (nullable UIFont *)fontH1:(BOOL)genericScaling;
|
||||
+ (nullable UIFont *)fontH1;
|
||||
//75Bd 25pt
|
||||
+ (nullable UIFont *)fontH2:(BOOL)genericScaling;
|
||||
+ (nullable UIFont *)fontH2;
|
||||
//75Bd 18pt
|
||||
+ (nullable UIFont *)fontH3:(BOOL)genericScaling;
|
||||
+ (nullable UIFont *)fontH3;
|
||||
//75Bd 32pt
|
||||
+ (nullable UIFont *)fontH32:(BOOL)genericScaling;
|
||||
+ (nullable UIFont *)fontH32;
|
||||
|
||||
//75Bd 13pt
|
||||
+ (nullable UIFont *)fontB1:(BOOL)genericScaling;
|
||||
+ (nullable UIFont *)fontB1;
|
||||
//55Rg 13pt
|
||||
+ (nullable UIFont *)fontB2:(BOOL)genericScaling;
|
||||
+ (nullable UIFont *)fontB2;
|
||||
//55Rg 11pt
|
||||
+ (nullable UIFont *)fontB3:(BOOL)genericScaling;
|
||||
+ (nullable UIFont *)fontB3;
|
||||
//55Rg 20pt
|
||||
+ (nullable UIFont *)fontB20:(BOOL)genericScaling;
|
||||
+ (nullable UIFont *)fontB20;
|
||||
|
||||
#pragma mark - 1.0 fonts
|
||||
|
||||
//75Bd 100pt
|
||||
+ (nullable UIFont *)fontForPlan;
|
||||
//75Bd 48pt
|
||||
+ (nullable UIFont *)fontForBiggerHeadline;
|
||||
//75Bd 15pt
|
||||
+ (nullable UIFont *)fontForHeadlineSmall;
|
||||
//55Rg 14pt
|
||||
+ (nullable UIFont *)fontforChatText;
|
||||
//55Rg 16pt
|
||||
+ (nullable UIFont *)fontForAccountLandingGreeting;
|
||||
//55Rg 10pt
|
||||
+ (nullable UIFont *)fontForProgressBarBottomLabel;
|
||||
//55Rg 14pt
|
||||
+ (nullable UIFont *)fontForPrimaryButton;
|
||||
//75Bd 11pt
|
||||
+ (nullable UIFont *)fontForSmallButton;
|
||||
//55Rg 16pt
|
||||
+ (nullable UIFont *)fontForTextField;
|
||||
//55Rg 12pt
|
||||
+ (nullable UIFont *)fontForTextFieldUnderLabel;
|
||||
//55Rg 24pt
|
||||
+ (nullable UIFont *)fontForHeadlineAlternative;
|
||||
//75Bd 16pt
|
||||
+ (nullable UIFont *)fontForFeedCardTitle;
|
||||
//75Bd 60pt
|
||||
+ (nullable UIFont *)fontForLargeLoyaltyHeaderTitle;
|
||||
//75Bd 42pt
|
||||
+ (nullable UIFont *)fontForLoyaltyTitleSmall;
|
||||
//55Rg 20pt
|
||||
+ (nullable UIFont *)fontForLoyaltyMessage;
|
||||
//75Bd 10pt only for support
|
||||
+ (nullable UIFont *)fontForUnreadMessageOnSupport;
|
||||
|
||||
//55Rg 16pt for 5G flow
|
||||
+ (nullable UIFont *)font5GMessage:(BOOL)genericScaling;
|
||||
|
||||
//55Rg 16pt for 5G flow scale YES
|
||||
+ (nullable UIFont *)font5GMessage;
|
||||
|
||||
|
||||
// Returns the fonts for these styles allowing to apply a generic scale by device or not.
|
||||
+ (nullable UIFont *)fontForBiggerHeadLine:(BOOL)genericScaling;
|
||||
+ (nullable UIFont *)fontForPlan:(BOOL)genericScaling;
|
||||
+ (nullable UIFont *)fontForHeadlineSmall:(BOOL)genericScaling;
|
||||
+ (nullable UIFont *)fontForHeadlineSmall2;
|
||||
+ (nullable UIFont *)fontForHeadlineSmall2:(BOOL)genericScaling;
|
||||
+ (nullable UIFont *)fontForHeadlineSmall2ForWidth:(CGFloat)size;
|
||||
+ (nullable UIFont *)fontB1ForWidth:(CGFloat)size;
|
||||
+ (nullable UIFont *)fontForBodyWithSize:(CGFloat)size genericScaling:(BOOL)genericScaling;
|
||||
+ (nullable UIFont *)fontB2ForWidth:(CGFloat)size;
|
||||
+ (nullable UIFont *)fontForBodyWithSize:(CGFloat)size forWidth:(CGFloat)width;
|
||||
+ (nullable UIFont *)fontforChatText:(BOOL)genericScaling;
|
||||
+ (nullable UIFont *)fontForAccountLandingGreeting:(BOOL)genericScaling;
|
||||
|
||||
+ (nullable UIFont *)fontForPrimaryButton:(BOOL)genericScaling;
|
||||
+ (nullable UIFont *)fontForPrimaryButtonForWidth:(CGFloat)size;
|
||||
+ (nullable UIFont *)fontForSmallButton:(BOOL)genericScaling;
|
||||
+ (nullable UIFont *)fontForSmallButtonForWidth:(CGFloat)size;
|
||||
+ (nullable UIFont *)fontForTextField:(BOOL)genericScaling;
|
||||
+ (nullable UIFont *)fontForTextFieldUnderLabel:(BOOL)genericScaling;
|
||||
+ (nullable UIFont *)fontForHeadlineAlternative:(BOOL)genericScaling;
|
||||
+ (nullable UIFont *)fontForHeadlineAlternativeForWidth:(CGFloat)size;
|
||||
|
||||
+ (nullable UIFont *)fontForFeedCardTitle:(BOOL)genericScaling;
|
||||
+ (nullable UIFont *)fontForLargeLoyaltyHeaderTitle:(BOOL)genericScaling;
|
||||
+ (nullable UIFont *)fontForLoyaltyTitleSmall:(BOOL)genericScaling;
|
||||
+ (nullable UIFont *)fontForLoyaltyMessage:(BOOL)genericScaling;
|
||||
+ (nullable UIFont *)fontForPtPCard:(BOOL)genericScaling;
|
||||
+ (nullable UIFont *)fontForLabelWithTopLeftCircleWithSize:(CGFloat)size genericScaling:(BOOL)genericScaling;
|
||||
+ (nullable UIFont *)fontOcratxtWitSize:(CGFloat)size genericScaling:(BOOL)genericScaling;
|
||||
+ (nullable UIFont *)fontH255:(BOOL)genericScaling;
|
||||
|
||||
+ (nonnull UIFont *) boldFontForScaledSize:(CGFloat)size;
|
||||
+ (nonnull UIFont *) regularFontForScaledSize:(CGFloat)size;
|
||||
|
||||
//-------------------------------------------------
|
||||
// Applies the styles to the passed in objects.
|
||||
|
||||
#pragma mark - 2.0 styles
|
||||
|
||||
/// Will style the label based on the string. Accepted values, H1, H2, H3, H32, B1, B2, B3, B20
|
||||
+ (void)styleLabel:(nonnull UILabel *)label withStyle:(nullable NSString *)style;
|
||||
|
||||
+ (void)styleLabelH1:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling;
|
||||
+ (void)styleLabelH1:(nonnull UILabel *)label;
|
||||
|
||||
+ (void)styleLabelH2:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling;
|
||||
+ (void)styleLabelH2:(nonnull UILabel *)label;
|
||||
|
||||
+ (void)styleLabelH3:(nonnull UILabel *)label;
|
||||
+ (void)styleLabelH3:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling;
|
||||
|
||||
+ (void)styleLabelH32:(nonnull UILabel *)label;
|
||||
+ (void)styleLabelH32:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling;
|
||||
|
||||
+ (void)styleLabelB1:(nonnull UILabel *)label;
|
||||
+ (void)styleLabelB1:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling;
|
||||
|
||||
+ (void)styleLabelB2:(nonnull UILabel *)label;
|
||||
+ (void)styleLabelB2:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling;
|
||||
+ (void)styleLabelB2:(nonnull UILabel *)label size:(CGFloat)size genericScaling:(BOOL)genericScaling;
|
||||
|
||||
+ (void)styleLabelB3:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling;
|
||||
+ (void)styleLabelB3:(nonnull UILabel *)label;
|
||||
|
||||
+ (void)styleLabelB20:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling;
|
||||
+ (void)styleLabelB20:(nonnull UILabel *)label;
|
||||
|
||||
+ (void)styleLabelTextStyle2:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling;
|
||||
+ (void)styleLabelTextStyle2:(nonnull UILabel *)label;
|
||||
|
||||
#pragma mark - 1.0 styles
|
||||
|
||||
+ (void)styleFeedCardTitleLabel:(nonnull UILabel *)label;
|
||||
+ (void)styleFeedCardTagLabel:(nonnull UILabel *)label;
|
||||
|
||||
+ (void)styleStandardSeparatorView:(nonnull UIView *)view;
|
||||
|
||||
+ (void)styleLabelHeadlineSmall:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling;
|
||||
|
||||
|
||||
+ (void)styleFeedCardTitleLabel:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling;
|
||||
+ (void)styleFeedCardTagLabel:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling;
|
||||
|
||||
//-------------------------------------------------
|
||||
|
||||
#pragma mark - Attributed Strings
|
||||
|
||||
/// Will style the string based on the string. Accepted values, H1, H2, H3, H32, B1, B2, B3, B20
|
||||
+ (nonnull NSAttributedString *)styleGetAttributedString:(nullable NSString *)string withStyle:(nullable NSString *)style;
|
||||
|
||||
+ (nonnull NSAttributedString *)styleGetAttributedString:(nullable NSString *)string font:(nonnull UIFont *)font color:(nonnull UIColor *)color;
|
||||
+ (nonnull NSAttributedString *)styleGetH1AttributedString:(nullable NSString *)string;
|
||||
+ (nonnull NSAttributedString *)styleGetH2AttributedString:(nullable NSString *)string;
|
||||
+ (nonnull NSAttributedString *)styleGetH3AttributedString:(nullable NSString *)string;
|
||||
+ (nonnull NSAttributedString *)styleGetB1AttributedString:(nullable NSString *)string;
|
||||
+ (nonnull NSAttributedString *)styleGetB2AttributedString:(nullable NSString *)string;
|
||||
+ (nonnull NSAttributedString *)styleGetB3AttributedString:(nullable NSString *)string;
|
||||
|
||||
+ (nonnull NSAttributedString *)styleGetDisabledB2AttributedString:(nullable NSString *)string;
|
||||
+ (nonnull NSAttributedString *)styleGetDisabledB1AttributedString:(nullable NSString *)string;
|
||||
+ (nonnull NSAttributedString *)styleGetTopAlignedAttributeStringWithLeftString:(nullable NSString *)left centerString:(nonnull NSString *)center rightString:(nullable NSString *)right withCenterStringFontSize:(CGFloat)fontSize andColor:(nonnull UIColor *)color;
|
||||
+ (nonnull NSAttributedString *)styleGetTopAlignedAttributeStringWithLeftStringRightTop:(nullable NSString *)left centerString:(nonnull NSString *)center rightString:(nullable NSString *)right withCenterStringFontSize:(CGFloat)fontSize andColor:(nonnull UIColor *)color;
|
||||
+ (void)styleGetAlignCenteredAttrituedString:(nullable NSMutableAttributedString *)string;
|
||||
+(nonnull NSAttributedString *)styleGetBoldStringWithFont:(nonnull UIFont *)inputFont fromString:(nonnull NSString *)inputString;
|
||||
+(nonnull NSString *)styleGetLowCaseSpace:(nullable NSString *)inputString;
|
||||
|
||||
//-------------------------------------------------
|
||||
// Returns colors for Gradient Text presets
|
||||
|
||||
+ (nonnull NSArray *)gradientSpecialTicketGold;
|
||||
+ (nonnull NSArray *)gradientSpecialTicketGoldCGColor;
|
||||
|
||||
#pragma mark - Custom Styling Views
|
||||
|
||||
+ (void)styleView:(nonnull UIView *)view showMFViewBorder:(MFViewBorder)border withColor:(nonnull UIColor *)color borderLineWidth:(CGFloat)borderLineWidth borderLineLength:(CGFloat)borderLineLengh;
|
||||
+ (void)styleTextField:(nonnull UITextField *)textField;
|
||||
+ (nullable UIImage *)grayscaleImage:(nullable UIImage *)image;
|
||||
+ (void)setGradientToLabel:(nonnull UILabel*)label withColors:(nonnull NSArray*)colors;
|
||||
+ (nonnull NSDictionary *)labelStrokeAttributes:(nonnull UIColor *)color;
|
||||
|
||||
+ (void)mfStyleBlackPageControl:(nullable UIPageControl *)pageControl;
|
||||
+ (void)mfStylePageControl:(nullable UIPageControl *)pageControl;
|
||||
|
||||
// leftTime should be left seconds
|
||||
// timeformat should follow "DD:HH:MM:SS", No space inside!
|
||||
+ (nonnull NSString *)getCountTime:(NSInteger)leftTime timeformat:(nonnull NSString *)timeFormat timeUnit:(MFTimeFormatUnit)timeUnit timeSuffix:(nullable NSString *)suffix;
|
||||
|
||||
+ (CGFloat)splitTextFieldWidth;
|
||||
+ (CGFloat)splitTextFieldWidthForViewWidth:(CGFloat)width;
|
||||
|
||||
@end
|
||||
@ -1,38 +0,0 @@
|
||||
//
|
||||
// MFTabBarInteractor.h
|
||||
// MobileFirstFramework
|
||||
//
|
||||
// Created by Chen, Mingyuan on 5/30/18.
|
||||
// Copyright © 2018 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
// This class uses an edge pan gesture to allow percent driven interactive transitioning from one view to another.
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@protocol MFSwipeNavigationProtocol<NSObject>
|
||||
|
||||
@optional
|
||||
|
||||
// Notifies the delegate we should begin the transition to the left or the right.
|
||||
- (void)swipeLeft;
|
||||
- (void)swipeRight;
|
||||
- (void)updatePercentage:(CGFloat)percentage;
|
||||
|
||||
@end
|
||||
|
||||
@interface MFTabBarInteractor : UIPercentDrivenInteractiveTransition
|
||||
|
||||
// true while panning
|
||||
@property (nonatomic) BOOL panning;
|
||||
|
||||
//set pannable percentage 0 to 1
|
||||
@property (nonatomic) CGFloat pannablePercentage;
|
||||
|
||||
// can be used to keep track of if we are ..
|
||||
@property (nonatomic) BOOL interactive;
|
||||
|
||||
- (nullable instancetype)initWithViewController:(nullable UIViewController<MFSwipeNavigationProtocol>*)delegate;
|
||||
|
||||
- (nullable instancetype)initWithViewController:(nullable UIViewController *)viewController delegate:(nullable id<MFSwipeNavigationProtocol>)delegate;
|
||||
|
||||
@end
|
||||
@ -1,17 +0,0 @@
|
||||
//
|
||||
// MFTabBarPageControlSwipingAnimator.h
|
||||
// MobileFirstFramework
|
||||
//
|
||||
// Created by Chen, Mingyuan on 5/22/18.
|
||||
// Copyright © 2018 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
// Used for animating left and right pushing of a UIViewController, usually through swiping.
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
@import MVMCore.MVMCoreViewControllerAnimatedTransitioning;
|
||||
|
||||
@interface MFTabBarSwipeAnimator : NSObject <MVMCoreViewControllerAnimatedTransitioning>
|
||||
|
||||
- (nullable instancetype)initWithSwipingDirection:(UISwipeGestureRecognizerDirection)direction controller:(UIViewController *_Nullable)controller;
|
||||
|
||||
@end
|
||||
@ -1,22 +0,0 @@
|
||||
//
|
||||
// MFTextButton.h
|
||||
// mobilefirst
|
||||
//
|
||||
// Created by Scott Pfeil on 3/23/17.
|
||||
// Copyright © 2017 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MFCustomButton.h"
|
||||
#import <MVMCoreUI/MFView.h>
|
||||
@class MFSizeObject;
|
||||
|
||||
@interface MFTextButton : MFCustomButton <MVMCoreViewProtocol, MVMCoreUIMoleculeViewProtocol, MVMCoreUIViewConstrainingProtocol>
|
||||
|
||||
@property (nonnull, strong, nonatomic) MFSizeObject *sizeObject;
|
||||
|
||||
+ (nonnull MFTextButton *)textButton;
|
||||
|
||||
// Returns text buttons. Can pass in the button to use, if not it will create it. Can also specify if we should constrain the height to the default.
|
||||
+ (nonnull MFTextButton *)textButton:(nullable UIButton *)button constrainHeight:(BOOL)constrainHeight forWidth:(CGFloat)width;
|
||||
|
||||
@end
|
||||
@ -1,135 +0,0 @@
|
||||
//
|
||||
// MFTextField.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by Suresh, Kamlesh on 11/24/15.
|
||||
// Copyright © 2015 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <MVMCoreUI/ViewConstrainingView.h>
|
||||
|
||||
@class PrimaryButton;
|
||||
@class MFTextField;
|
||||
@class Label;
|
||||
|
||||
@protocol MFTextFieldDelegate <NSObject>
|
||||
|
||||
@optional
|
||||
|
||||
// Called when the entered text becomes valid based on the validation block
|
||||
- (void)entryIsValid:(nullable MFTextField *)textfield;
|
||||
|
||||
// Called when the entered text becomes invalid based on the validation block
|
||||
- (void)entryIsInvalid:(nullable MFTextField *)textfield;
|
||||
|
||||
// Dismisses the keyboard.
|
||||
- (void)dismissFieldInput:(nullable id)sender;
|
||||
|
||||
@end
|
||||
|
||||
@interface MFTextField : ViewConstrainingView <MVMCoreUIMoleculeViewProtocol>
|
||||
|
||||
@property (nullable, weak, nonatomic) UIView *view;
|
||||
|
||||
@property (nullable, weak, nonatomic) IBOutlet UIView *textFieldContainerView;
|
||||
@property (nullable, weak, nonatomic) IBOutlet UITextField *textField;
|
||||
@property (nullable, weak, nonatomic) IBOutlet Label *formLabel;
|
||||
@property (nullable, weak, nonatomic) IBOutlet UIView *separatorView;//make it public so outsider class can know the posistion of it.
|
||||
|
||||
@property (nullable, weak, nonatomic) IBOutlet NSLayoutConstraint *heightConstraint;
|
||||
@property (weak, nonatomic, nullable) IBOutlet NSLayoutConstraint *formLabelRightPin;
|
||||
|
||||
@property (nonatomic,getter=isEnabled) BOOL enabled;
|
||||
|
||||
// To set the placeholder and text
|
||||
@property (nullable, weak, nonatomic) NSString *text;
|
||||
@property (nullable, weak, nonatomic) NSString *formText;
|
||||
@property (nullable, weak, nonatomic) NSString *fieldKey;
|
||||
|
||||
@property (nullable, weak, nonatomic) NSString *placeholder; // will move out in Feb release
|
||||
|
||||
@property (assign, nonatomic) BOOL hideBorder;
|
||||
|
||||
//accesories
|
||||
@property (nullable, weak, nonatomic) UIDatePicker *datePicker;
|
||||
@property (nullable, weak, readonly, nonatomic) UIToolbar *toolbar;
|
||||
|
||||
//helper
|
||||
@property (nullable, strong, nonatomic) NSDateFormatter *formatter;
|
||||
|
||||
// If you're using a MFViewController, you must set this to it
|
||||
@property (nullable, weak, nonatomic) id<UITextFieldDelegate> uiTextFieldDelegate;
|
||||
|
||||
// The delegate and block for validation. Validates if the text that the user has entered is valid or not. Checked after each change if there is a delegate.
|
||||
@property (nullable, weak, nonatomic) id<MFTextFieldDelegate> mfTextFieldDelegate;
|
||||
@property (nonatomic, getter=isValid) BOOL valid;
|
||||
@property (nullable, copy, nonatomic) BOOL (^validationBlock)(NSString *_Nullable enteredValue);
|
||||
|
||||
// custom text colors
|
||||
@property (nullable, strong, nonatomic) UIColor *customEnabledTextColor;
|
||||
@property (nullable, strong, nonatomic) UIColor *customDisabledTextColor;
|
||||
|
||||
//default error message
|
||||
@property (nullable, strong, nonatomic) NSString *errMessage;
|
||||
|
||||
@property (nullable, copy, nonatomic) void (^editCompleteAction)(NSString * _Nullable text);
|
||||
|
||||
// Returns the actual MFTextfield object from XIB. Should only be called from the main thread.
|
||||
+ (nullable instancetype)mfTextField;
|
||||
+ (nullable instancetype)mfTextFieldWithBothDelegates:(nullable id<UITextFieldDelegate, MFTextFieldDelegate>)delegate;
|
||||
+ (nullable instancetype)mfTextFieldWithMap:(nullable NSDictionary *)map bothDelegates:(nullable id<UITextFieldDelegate, MFTextFieldDelegate>)delegate;
|
||||
|
||||
|
||||
// Returns the actual MFTextfield object from XIB. Has dropdown carrot. Should only be called from the main thread.
|
||||
+ (nullable instancetype)mfTextFieldForDropDown;
|
||||
+ (nullable instancetype)mfTextFieldForDropDownWithBothDelegates:(nullable id<UITextFieldDelegate, MFTextFieldDelegate>)delegate;
|
||||
|
||||
// Sets both
|
||||
- (void)setBothTextFieldDelegates:(id<UITextFieldDelegate,MFTextFieldDelegate> _Nullable)delegate;
|
||||
// Sets the place holder and text according to the map
|
||||
- (void)setWithMap:(nullable NSDictionary *)map bothDelegates:(nullable id<UITextFieldDelegate, MFTextFieldDelegate>) delegate;
|
||||
|
||||
|
||||
// set place holder with custom colors
|
||||
- (void)setPlaceholder:(nullable NSString *)placeholder withColor:(nullable UIColor *)color;
|
||||
|
||||
//show the dropDown carrot
|
||||
- (void)showDropDown:(BOOL)show;
|
||||
|
||||
// Show error
|
||||
- (void)setErrorMessage:(nonnull NSString *)errorMessage;
|
||||
|
||||
// Hide Error
|
||||
- (void)hideError;
|
||||
|
||||
//push notificaiton of accessibility
|
||||
- (void)pushAccessibilityNotification;
|
||||
|
||||
// disable textfield
|
||||
- (void)enable:(BOOL)enable;
|
||||
|
||||
// Default validation block
|
||||
- (void)setDefaultValidationBlock;
|
||||
|
||||
//add date picker as inputView for the textfield, default done action is to set the textfield input
|
||||
- (void)inputFromDatePickerFromDate:(nullable NSDate *)fromDate toDate:(nullable NSDate *)toDate showFromDateAsDefaultInput:(BOOL)show;
|
||||
- (void)setDatePickerFromDate:(nullable NSDate *)fromDate toDate:(nullable NSDate *)toDate;
|
||||
- (nonnull NSDate *)dismissDatePicker;
|
||||
- (void)dismissPicker;
|
||||
|
||||
//get all enabled textfields, can be pairly used with the primary button's handleEnablingWithTextFields if you only want the enable testfield's validation to be tested
|
||||
+ (nullable NSArray *)getEnabledTextfields:(nullable NSArray <MFTextField *>*)textFieldToDetermine;
|
||||
|
||||
- (void)showLabel:(BOOL)show;
|
||||
|
||||
//By default, the validation block is validated only on textfield value changed. This method is added to validate explicitly if the block is dependent on any other variables and will update the isValid accordingly.
|
||||
- (void)validateBlock;
|
||||
|
||||
- (void)setAccessibilityString:(nullable NSString *)accessibilityString;
|
||||
|
||||
// For Validator Protocol
|
||||
- (nullable NSString *)formFieldName;
|
||||
- (nullable id)formFieldValue;
|
||||
|
||||
@end
|
||||
@ -1,37 +0,0 @@
|
||||
//
|
||||
// MFTextFieldSubclassExtension.h
|
||||
// mobilefirst
|
||||
//
|
||||
// Created by Scott Pfeil on 12/5/16.
|
||||
// Copyright © 2016 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
#import <MVMCoreUI/MFTextField.h>
|
||||
|
||||
@class DashLine;
|
||||
|
||||
@interface MFTextField ()
|
||||
|
||||
@property (nullable, weak, nonatomic, readwrite) IBOutlet UILabel *label;
|
||||
//accesories
|
||||
@property (nullable, weak, readwrite, nonatomic) UIPickerView *pickerView;
|
||||
@property (nullable, weak, readwrite, nonatomic) UIToolbar *toolbar;
|
||||
|
||||
|
||||
//utility
|
||||
@property (nonatomic) BOOL observingForChanges;
|
||||
@property (nonatomic, readwrite) BOOL errorShowing;
|
||||
@property (nonatomic) BOOL hasDropDown;
|
||||
|
||||
|
||||
//helper views
|
||||
@property (nullable, weak, nonatomic) IBOutlet DashLine *dashLine;
|
||||
@property (nullable, weak, nonatomic) IBOutlet UILabel *dropDownCarrotLabel;
|
||||
@property (nullable, weak, nonatomic) IBOutlet NSLayoutConstraint *dropDownCarrotWidth;
|
||||
|
||||
- (void)setupView;
|
||||
- (void)valueChanged;
|
||||
- (void)startEditing;
|
||||
- (nullable UINib *)getNib;
|
||||
|
||||
@end
|
||||
@ -1,39 +0,0 @@
|
||||
//
|
||||
// MFTextView.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by chintar on 14/12/15.
|
||||
// Copyright © 2015 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "SeparatorView.h"
|
||||
|
||||
@interface CustomTextView: UITextView
|
||||
|
||||
@end
|
||||
|
||||
@protocol MFTextViewDelegate <NSObject>
|
||||
|
||||
@optional
|
||||
|
||||
// Dismisses the keyboard.
|
||||
- (void)dismissFieldInput:(nullable id)sender;
|
||||
|
||||
@end
|
||||
|
||||
@interface MFTextView : UIView <UITextViewDelegate>
|
||||
|
||||
@property (weak, nonatomic, nullable) id delegate;
|
||||
@property (nullable, weak, nonatomic) IBOutlet CustomTextView *textView;
|
||||
@property (assign, nonatomic) BOOL hideBorder;
|
||||
@property (strong, nonatomic, nullable) UIBezierPath *borderPath;
|
||||
@property (nonatomic, readwrite) BOOL errorShowing;
|
||||
@property (weak, nonatomic, nullable) SeparatorView *bottomLine;
|
||||
|
||||
+(MFTextView *_Nullable) MFTextViewWithPlaceholderString:(NSString *_Nullable) placeholder delegate:(id _Nullable ) delegate;
|
||||
|
||||
//This method will make the UI as per brand refresh (Similar to UITextField)
|
||||
- (void)makeBordersForTextView;
|
||||
|
||||
@end
|
||||
@ -1,24 +0,0 @@
|
||||
//
|
||||
// MFView.h
|
||||
// mobilefirst
|
||||
//
|
||||
// Created by Scott Pfeil on 2/23/17.
|
||||
// Copyright © 2017 Verizon Wireless Inc. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <MVMCoreUI/MVMCoreUIMoleculeViewProtocol.h>
|
||||
#import <MVMCoreUI/MVMCoreUIViewConstrainingProtocol.h>
|
||||
@import MVMCore.MVMCoreViewProtocol;
|
||||
|
||||
@interface MFView : UIView <MVMCoreViewProtocol, MVMCoreUIMoleculeViewProtocol, MVMCoreUIViewConstrainingProtocol>
|
||||
|
||||
@property (nullable, nonatomic, strong) NSDictionary *json;
|
||||
|
||||
// Called in the initialization functions. Can setup ui here.
|
||||
- (void)setupView;
|
||||
|
||||
// Updates the ui to fit the right size.
|
||||
- (void)updateView:(CGFloat)size;
|
||||
|
||||
@end
|
||||
@ -1,283 +0,0 @@
|
||||
//
|
||||
// MFViewController.h
|
||||
// myverizon
|
||||
//
|
||||
// Created by Scott Pfeil on 11/26/13.
|
||||
// Copyright (c) 2013 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
// The base view controller. Any view controller that is part of the app flow should be subclassed from this object.
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
@import MVMCore.MVMCoreErrorObject;
|
||||
@import MVMCore.MVMCoreLoadDelegateProtocol;
|
||||
@import MVMCore.MVMCorePresentationDelegateProtocol;
|
||||
@import MVMCore.MVMCoreActionDelegateProtocol;
|
||||
@import MVMCore.NSDictionary_MFConvenience;
|
||||
@import MVMCore.MVMCoreLoadObject;
|
||||
@import MVMCore.MVMCoreJSONConstants;
|
||||
@import MVMCore.MVMCoreRequestParameters;
|
||||
@import MVMCore.MVMCoreActionHandler;
|
||||
@import MVMCore.MVMCoreTopAlertObject;
|
||||
@import MVMCore.MVMCoreAlertObject;
|
||||
@import MVMCore.MVMCoreViewControllerProtocol;
|
||||
@import MVMCore.MVMCoreViewManagerViewControllerProtocol;
|
||||
@import MVMCore.MVMCoreViewManagerProtocol;
|
||||
|
||||
#import <MVMCoreUI/MFTextField.h>
|
||||
#import <MVMCoreUI/ButtonDelegateProtocol.h>
|
||||
#import <MVMCoreUI/MFStyler.h>
|
||||
#import <MVMCoreUI/MVMCoreUIDetailViewProtocol.h>
|
||||
#import <MVMCoreUI/MoleculeDelegateProtocol.h>
|
||||
|
||||
@class MainMenuViewController;
|
||||
@class MVMCoreUITabBarPageControlViewController;
|
||||
@class MVMAnimationManager;
|
||||
@class DelegateObject;
|
||||
|
||||
@interface MFViewController : UIViewController <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol, MVMCoreActionDelegateProtocol, UITextFieldDelegate, UITextViewDelegate, MFTextFieldDelegate, ButtonDelegateProtocol, MVMCoreViewControllerProtocol, MVMCoreViewManagerViewControllerProtocol, MVMCoreUIDetailViewProtocol, MoleculeDelegateProtocol>
|
||||
|
||||
// Stores the load object that this screen was loaded with.
|
||||
@property (nullable, strong, nonatomic) MVMCoreLoadObject *loadObject;
|
||||
|
||||
// The current selected text field.
|
||||
@property (nullable, weak, nonatomic) __block id selectedField;
|
||||
|
||||
// Flags for if the master and support should be accessible. These are set initially and then checked everytime view will appear to make sure that the support and master buttons are showing if they should be.
|
||||
// ** When set, they will update the support and master buttons
|
||||
@property (nonatomic) BOOL masterShouldBeAccessible;
|
||||
@property (nonatomic) BOOL supportShouldBeAccessible;
|
||||
|
||||
// A flag for if we need to update the UI or not next time viewDidLayoutSubviews is called.
|
||||
@property (nonatomic) BOOL needToUpdateUI;
|
||||
|
||||
// flag used to tell if we need to updateViews based on rotation.
|
||||
@property (nonatomic) BOOL needToupdateUIOnScreenSizeChanges;
|
||||
|
||||
|
||||
// A flag for if this viewControler should trigger MFAnimationController's StartAnimations in viewDidAppear
|
||||
@property (nonatomic) BOOL shouldTriggerStartAnimations;
|
||||
|
||||
// The page type for this screen.
|
||||
@property (nullable, strong, nonatomic) NSString *pageType;
|
||||
|
||||
// Set if this page is containted in a manager.
|
||||
@property (nullable, weak, nonatomic) UIViewController <MVMCoreViewManagerProtocol>*manager;
|
||||
|
||||
// Convenience for mf. Set if this page is containted in a tab bar page control.
|
||||
@property (nullable, weak, nonatomic) MVMCoreUITabBarPageControlViewController *tabBarPageControl;
|
||||
|
||||
/* The bottom progress view that is shown in the shop flow */
|
||||
@property (nullable, nonatomic, strong) UIProgressView *progressView;
|
||||
|
||||
// The size of the previous screen configuration. Updates each rotate.
|
||||
@property (nonatomic) CGSize previousScreenSize;
|
||||
|
||||
// The current top alert showing page type
|
||||
@property (nullable, nonatomic, strong) NSString *currentTopAlertPageType;
|
||||
|
||||
#pragma mark - Helpers
|
||||
|
||||
// Dismisses this screen.
|
||||
- (void)dismiss;
|
||||
|
||||
// Checks if this view controller is the visible one (not necessarily visible to user, but for the app).
|
||||
- (BOOL)isVisibleViewController;
|
||||
|
||||
// Registers the text field for the error key so that if there is a text field error with this key, the textfield will show the error.
|
||||
- (void)registerTextField:(nonnull MFTextField *)textField forErrorKey:(nonnull NSString *)errorKey;
|
||||
|
||||
// Returns if the screen size has changed.
|
||||
- (BOOL)screenSizeChanged;
|
||||
|
||||
/// If we have new data, this is called. It calls newDataBuildScreen and sets the ui to update.
|
||||
- (void)newDataBuildAndUpdate;
|
||||
|
||||
#pragma mark - Functions To Subclass
|
||||
|
||||
// This view controller should subclass this function and check the load to make sure it has all the needed data. Fills the error object if there are any errors. Returns if we should finish the load or not.
|
||||
- (BOOL)shouldFinishProcessingLoad:(nonnull MVMCoreLoadObject *)loadObject error:(MVMCoreErrorObject *_Nonnull *_Nonnull)error;
|
||||
|
||||
// Sets the screen to use the screen heading.
|
||||
// it is required in device flow, where we are showing greeting name as screen heading,
|
||||
// device details screen heading needs to be updated/refreshed again, if user has changed device nick name
|
||||
- (nullable NSString *)screenHeading;
|
||||
|
||||
// properly set the screen heading message
|
||||
- (void)setScreenHeadingMessage:(nullable NSString *)screenHeadingMessage;
|
||||
|
||||
// There is new data and we need to reset the data for the screen. Refresh all logic based on json dictionary. Can put most view creation logic in here.
|
||||
- (void)newDataBuildScreen;
|
||||
|
||||
// A function that gets called on only the initial load. Meant for subclassing.
|
||||
- (void)initialLoad __attribute__((objc_requires_super));
|
||||
|
||||
// Subclass this function to layout any subviews here. Update constraints based on the screen in here.
|
||||
- (void)updateViews;
|
||||
|
||||
// Called when the back button is pressed. Overwrite for special functionality. Default is to just popviewcontroller.
|
||||
- (void)backButtonPressed;
|
||||
|
||||
// Handles the error. Logs and shows to screen.
|
||||
- (void)handleErrorAsPopup:(nonnull MVMCoreErrorObject *)error;
|
||||
|
||||
#pragma mark - Response Handling
|
||||
|
||||
// Called to begin observing for json updates. Called by default in view did load if pageTypesToListenFor returns an array with page types.
|
||||
- (void)observeForResponseJSONUpdates;
|
||||
|
||||
// Stops observing for json objects.
|
||||
- (void)stopObservingForResponseJSONUpdates;
|
||||
|
||||
// Returns an array of page types to observe for when we receive a response with JSON. Subclass this to have the ui update when the returned page types are cached.
|
||||
- (nullable NSArray *)pageTypesToListenFor;
|
||||
|
||||
// Returns an array of modules to observe for when we receive a response with JSON. Subclass this to have the ui update when the returned page types are cached.
|
||||
- (nullable NSArray *)modulesToListenFor;
|
||||
|
||||
/// The function that gets called by the notification center when the JSON is updated, if we have anything we are listening for (pageTypesToListenFor, modulesToListenFor). This function also tells the screen to update (newDataBuildAndUpdate) if we received new json that we were listening for.
|
||||
- (void)responseJSONUpdated:(nonnull NSNotification *)notification;
|
||||
|
||||
/// Sets the page on the load object. Default returns true. Return true if the page is loaded and newDataBuildAndUpdate needs to happen. Can subclass to avoid this.
|
||||
- (BOOL)newPageLoaded:(nonnull NSDictionary *)page;
|
||||
|
||||
/// Appends to the modules on the load object. Default returns true. Return true if the modules are loaded and newDataBuildAndUpdate needs to happen. Can subclass to avoid this.
|
||||
- (BOOL)newModulesLoaded:(nonnull NSDictionary *)modules;
|
||||
|
||||
/** Verifies that all needed modules are loaded
|
||||
* @param loadObject The load data from the cache or server.
|
||||
* @param error The error object passed in will be set in the case of an error.
|
||||
* @return True if the calling process should continue. */
|
||||
+ (BOOL)verifyRequiredModulesLoadedForLoadObject:(nullable MVMCoreLoadObject *)loadObject error:(MVMCoreErrorObject *_Nonnull *_Nonnull)error;
|
||||
|
||||
#pragma mark - Navigation Item, Menu, Support, Top Alert
|
||||
|
||||
// overide to set the navigation bar tint color
|
||||
- (nullable UIColor *)navigationBarTintColor;
|
||||
|
||||
// Sets the navigation bar color when the screen is loaded. Can be subclassed to change this logic.
|
||||
- (nonnull UIColor *)navigationBarColor;
|
||||
|
||||
// Default is no.
|
||||
- (BOOL)navigationBarHidden;
|
||||
|
||||
// Default is no.
|
||||
- (BOOL)navigationBarTransparent;
|
||||
|
||||
// Handles the navigation bar ui.
|
||||
- (void)updateNavigationBarUI:(nonnull UINavigationController *)navigationController;
|
||||
|
||||
// Returns if the master panel is initially accessible or not. This is always true in the base class. Subclass to override.
|
||||
- (BOOL)isMasterInitiallyAccessible;
|
||||
|
||||
// Returns if the support panel is initially accessible or not. This is always true in the base class. Subclass to override.
|
||||
- (BOOL)isSupportInitiallyAccessible;
|
||||
|
||||
// This returns a server driven flag. By default we don't show support before launchapp unless server says otherwise.
|
||||
- (BOOL)showRightPanelForScreenBeforeLaunchApp;
|
||||
|
||||
// Called when the user presses a menu option. Determines if we should load the option the default way or not.
|
||||
- (BOOL)mainTableView:(nonnull MainMenuViewController *)mainTableView shouldSelectOptionAtIndexPath:(nonnull NSIndexPath *)indexPath;
|
||||
|
||||
#pragma mark - UITextField Functions
|
||||
|
||||
// Resigns the first responder.
|
||||
- (IBAction)textFieldDoneEditing:(nullable id)sender;
|
||||
|
||||
// Dismisses the keyboard.
|
||||
- (void)dismissFieldInput:(nullable id)sender;
|
||||
|
||||
#pragma mark - TableView
|
||||
|
||||
// For subclassing, returns the number of sections for table. Use this function instead of numberOfSectionsForTableview.
|
||||
- (NSInteger)getNumberOfSections;
|
||||
|
||||
#pragma mark - ButtonDelegateProtocol
|
||||
|
||||
// Returns YES by default.
|
||||
- (BOOL)button:(nonnull NSObject <MFButtonProtocol> *)button shouldPerformActionWithMap:(nullable NSDictionary *)actionMap additionalData:(nullable NSDictionary *)additionalData;
|
||||
|
||||
#pragma mark - MVMCoreActionDelegateProtocol
|
||||
|
||||
// track the action which is fired
|
||||
- (void)logActionWithActionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData;
|
||||
|
||||
// Asks the load handler to load. standard.
|
||||
- (void)handleOpenPageForRequestParameters:(nonnull MVMCoreRequestParameters *)requestParameters actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData NS_REQUIRES_SUPER;
|
||||
|
||||
// Calls dismiss
|
||||
- (void)handleBackAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData;
|
||||
|
||||
// This will try to load the previous submission by default and append any additional data.
|
||||
- (void)prepareRequestForPreviousSubmission:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData submit:(nonnull void (^)(MVMCoreRequestParameters * _Nonnull requestParameters, NSDictionary * _Nullable dataForPage))submit;
|
||||
|
||||
// Does nothing at the moment.
|
||||
- (void)willShowPopupWithAlertObject:(nonnull MVMCoreAlertObject *)alertObject alertJson:(nonnull NSDictionary *)alertJson;
|
||||
|
||||
// Handle cancel
|
||||
- (void)handleCancel:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData;
|
||||
|
||||
// Calls the default. See MVMCoreActionHandler
|
||||
- (void)handleUnknownActionType:(nullable NSString *)actionType actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData;
|
||||
|
||||
// Calls the default. See MVMCoreActionHandler
|
||||
- (void)handleActionError:(nonnull MVMCoreErrorObject *)error additionalData:(nullable NSDictionary *)additionalData;
|
||||
|
||||
// Does nothing
|
||||
- (void)prepareForOpenOtherAppModule:(nullable NSString *)module;
|
||||
|
||||
#pragma mark - MVMCoreLoadDelegateProtocol
|
||||
|
||||
/////-----------------------------------------------------------------------------------
|
||||
// Standard Protocol Functions (refer to the MVMCoreLoadDelegateProtocol for more.
|
||||
// Listed here in the .h so subclass could call [super] if need be.
|
||||
|
||||
// By default, returns YES.
|
||||
- (BOOL)shouldContinueToErrorPage:(nonnull MVMCoreLoadObject *)loadObject error:(nullable MVMCoreErrorObject *)error;
|
||||
|
||||
// Calls the default, see LoadHandler.
|
||||
- (BOOL)handleModuleError:(nonnull NSString *)module loadObject:(nonnull MVMCoreLoadObject *)loadObject error:(nonnull MVMCoreErrorObject *)error;
|
||||
|
||||
// By default, lets the alert object handle showing itself.
|
||||
- (nullable MVMCoreAlertObject *)alertObjectToShow:(nonnull MVMCoreLoadObject *)loadObject error:(nullable MVMCoreErrorObject *)errorObject;
|
||||
|
||||
// By default, goes through all of the fields register with registerTextField and sets the error for them if needed.
|
||||
- (void)handleFieldErrors:(nullable NSArray *)fieldErrors loadObject:(nonnull MVMCoreLoadObject *)loadObject;
|
||||
|
||||
// Calls the default, see LoadHandler.
|
||||
- (void)loadFinished:(nullable MVMCoreLoadObject *)loadObject loadedViewController:(nullable MFViewController *)loadedViewController error:(nullable MVMCoreErrorObject *)error __attribute__((objc_requires_super));
|
||||
|
||||
// By default, does nothing.
|
||||
- (void)loadCancelled:(nullable MVMCoreLoadObject *)loadObject;
|
||||
|
||||
#pragma mark - adobe analytics
|
||||
|
||||
// add any addtional track data for the action that is fired with the main action informaiton.
|
||||
- (nullable NSArray <NSDictionary *> *)additionalActionsToTrackWithMainActionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData;
|
||||
|
||||
// Returns action track data, it can be overrided for customization
|
||||
- (nullable NSDictionary *)getActionTrackDataDictionaryForActionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData;
|
||||
|
||||
// Initiates track page state
|
||||
- (void)adobeTrackPageState;
|
||||
|
||||
// can be subclassed to return any additional data for action tracking
|
||||
- (nullable NSDictionary *)additionalDataToTrackActionWithActionInformation:(nullable NSDictionary *)actionInformation;
|
||||
|
||||
// can be subclassed to return any additional data for page tracking
|
||||
- (nullable NSDictionary *)additionalDataToTrackForPage;
|
||||
|
||||
// can be subclased to return dynamic pagename values for page tracking
|
||||
- (nullable NSArray *)dynamicPageNameValuesToTrackPage;
|
||||
|
||||
#pragma mark - Animation
|
||||
|
||||
// main manager used for intro animations
|
||||
@property (nullable, strong, nonatomic) MVMAnimationManager *introAnimationManager;
|
||||
// property to check if controller has animations disabled
|
||||
@property (assign) BOOL disableAnimations;
|
||||
|
||||
// subclass to set up intro animations
|
||||
- (void)setupIntroAnimations;
|
||||
|
||||
@end
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user