Merge branch 'develop' into feature/revised_accessibility
This commit is contained in:
commit
a37c0ba761
@ -128,7 +128,8 @@ import UIKit
|
|||||||
}
|
}
|
||||||
|
|
||||||
open class func verifyRequiredModulesLoaded(for loadObject: MVMCoreLoadObject?, error: AutoreleasingUnsafeMutablePointer<MVMCoreErrorObject>) -> Bool {
|
open class func verifyRequiredModulesLoaded(for loadObject: MVMCoreLoadObject?, error: AutoreleasingUnsafeMutablePointer<MVMCoreErrorObject>) -> Bool {
|
||||||
guard let pageType = loadObject?.pageType, var modulesRequired = MVMCoreUIViewControllerMappingObject.shared()?.modulesRequired(forPageType: pageType) else { return true }
|
guard let pageType = loadObject?.pageType, var modulesRequired = MVMCoreUIViewControllerMappingObject.shared()?.modulesRequired(forPageType: pageType),
|
||||||
|
!modulesRequired.isEmpty else { return true }
|
||||||
|
|
||||||
guard let loadedModules = loadObject?.modulesJSON else { return false }
|
guard let loadedModules = loadObject?.modulesJSON else { return false }
|
||||||
|
|
||||||
|
|||||||
@ -72,6 +72,10 @@
|
|||||||
// Creates, pins, and returns a safe area view for the passed in view.
|
// Creates, pins, and returns a safe area view for the passed in view.
|
||||||
+ (nullable UIView *)getAndSetupSafeAreaViewOnView:(nonnull UIView *)view;
|
+ (nullable UIView *)getAndSetupSafeAreaViewOnView:(nonnull UIView *)view;
|
||||||
|
|
||||||
|
#pragma mark border
|
||||||
|
|
||||||
|
+ (nullable UIImage *)addBorderToImage:(nullable UIImage *)image;
|
||||||
|
|
||||||
#pragma mark - shadows
|
#pragma mark - shadows
|
||||||
|
|
||||||
+ (void)drawBottomCurvedShadowsOnRect:(CGRect)rect toView:(nullable UIView *)view;
|
+ (void)drawBottomCurvedShadowsOnRect:(CGRect)rect toView:(nullable UIView *)view;
|
||||||
|
|||||||
@ -222,6 +222,35 @@ static const CGFloat VertialShadowOffset = 6;
|
|||||||
return safeAreaView;
|
return safeAreaView;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma mark border
|
||||||
|
|
||||||
|
+ (nullable UIImage *)addBorderToImage:(nullable UIImage *)image {
|
||||||
|
if (!image) {
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
CGSize size = [image size];
|
||||||
|
UIGraphicsBeginImageContext(size);
|
||||||
|
|
||||||
|
CGContextRef context = UIGraphicsGetCurrentContext();
|
||||||
|
CGContextSetRGBStrokeColor(context, 0.0, 0.0, 0.0, 1.0);
|
||||||
|
CGContextSetLineWidth(context, 1.0);
|
||||||
|
CGContextMoveToPoint(context, 0, 0);
|
||||||
|
CGContextAddLineToPoint(context, size.width, 0);
|
||||||
|
CGContextAddLineToPoint(context, size.width, size.height);
|
||||||
|
CGContextAddLineToPoint(context, 0, size.height);
|
||||||
|
CGContextAddLineToPoint(context, 0, 0);
|
||||||
|
CGContextStrokePath(context);
|
||||||
|
|
||||||
|
//Comensating for the border so that none of the image is missed
|
||||||
|
CGRect newImageRect = CGRectMake(1, 1, size.width - 2, size.height - 2);
|
||||||
|
[image drawInRect: newImageRect];
|
||||||
|
|
||||||
|
UIImage *imageWithBorder = UIGraphicsGetImageFromCurrentImageContext();
|
||||||
|
UIGraphicsEndImageContext();
|
||||||
|
return imageWithBorder;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#pragma mark - shadows
|
#pragma mark - shadows
|
||||||
|
|
||||||
+ (void)drawBottomCurvedShadowsOnRect:(CGRect)rect toView:(nullable UIView *)view {
|
+ (void)drawBottomCurvedShadowsOnRect:(CGRect)rect toView:(nullable UIView *)view {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user