diff --git a/MyLayout/Lib/MyBaseLayout.m b/MyLayout/Lib/MyBaseLayout.m index 4eaf9e5..ee2d454 100644 --- a/MyLayout/Lib/MyBaseLayout.m +++ b/MyLayout/Lib/MyBaseLayout.m @@ -2219,7 +2219,7 @@ - (CGFloat)myGetBoundLimitMeasure:(MyLayoutSize *)anchor subview:(UIView *)subvi } else if (valType == MyLayoutValType_LayoutSize) { if (anchor.anchorVal.view == self) { if (anchor.anchorVal.anchorType == MyLayoutAnchorType_Width) { - value = selfLayoutSize.width - (self.myLayoutLeadingPadding + self.myLayoutTrailingPadding); + value = selfLayoutSize.width - (self.myLayoutPaddingLeading + self.myLayoutPaddingTrailing); } else { value = selfLayoutSize.height - (self.myLayoutPaddingTop + self.myLayoutPaddingBottom); } @@ -2433,11 +2433,11 @@ - (CGFloat)myLayoutPaddingLeft { - (CGFloat)myLayoutPaddingRight { return self.myCurrentSizeClass.myLayoutPaddingRight; } -- (CGFloat)myLayoutLeadingPadding { - return self.myCurrentSizeClass.myLayoutLeadingPadding; +- (CGFloat)myLayoutPaddingLeading { + return self.myCurrentSizeClass.myLayoutPaddingLeading; } -- (CGFloat)myLayoutTrailingPadding { - return self.myCurrentSizeClass.myLayoutTrailingPadding; +- (CGFloat)myLayoutPaddingTrailing { + return self.myCurrentSizeClass.myLayoutPaddingTrailing; } - (void)myLayout:(MyLayoutTraits *)layoutTraits adjustScrollViewContentWithSize:(CGSize)newSize { diff --git a/MyLayout/Lib/MyFloatLayout.m b/MyLayout/Lib/MyFloatLayout.m index 8aa53c8..8752338 100644 --- a/MyLayout/Lib/MyFloatLayout.m +++ b/MyLayout/Lib/MyFloatLayout.m @@ -111,8 +111,8 @@ - (CGSize)calcLayoutSize:(CGSize)size subviewEngines:(NSMutableArraysubviewEngines = [layoutTraits filterEngines:subviewEngines]; context->paddingTop = layoutTraits.myLayoutPaddingTop; context->paddingBottom = layoutTraits.myLayoutPaddingBottom; - context->paddingLeading = layoutTraits.myLayoutLeadingPadding; - context->paddingTrailing = layoutTraits.myLayoutTrailingPadding; + context->paddingLeading = layoutTraits.myLayoutPaddingLeading; + context->paddingTrailing = layoutTraits.myLayoutPaddingTrailing; context->vertGravity = MYVERTGRAVITY(layoutTraits.gravity); context->horzGravity = [MyViewTraits convertLeadingTrailingGravityFromLeftRightGravity:MYHORZGRAVITY(layoutTraits.gravity)]; context->vertSpace = layoutTraits.subviewVSpace; @@ -667,7 +667,7 @@ - (void)myDoVertOrientationLayoutWithContext:(MyLayoutContext *)context { if (lineHasAlignment) { CGFloat baselinePos = CGFLOAT_MAX; for (NSInteger i = lineFirstIndex; i <= idx; i++) { - MyLayoutEngine *subviewEngine = context->subviewEngines[i]; + MyLayoutEngine *subviewEngine = context->subviewEngines[i]; MyViewTraits *subviewTraits = subviewEngine.currentSizeClass; MyGravity subviewVertAlignment = MYVERTGRAVITY(subviewTraits.alignment); UIFont *subviewFont = nil; diff --git a/MyLayout/Lib/MyFlowLayout.m b/MyLayout/Lib/MyFlowLayout.m index 08b22c9..fe3113e 100644 --- a/MyLayout/Lib/MyFlowLayout.m +++ b/MyLayout/Lib/MyFlowLayout.m @@ -158,8 +158,8 @@ - (CGSize)calcLayoutSize:(CGSize)size subviewEngines:(NSMutableArraylayoutViewEngine.currentSizeClass; context->paddingTop = layoutTraits.myLayoutPaddingTop; context->paddingBottom = layoutTraits.myLayoutPaddingBottom; - context->paddingLeading = layoutTraits.myLayoutLeadingPadding; - context->paddingTrailing = layoutTraits.myLayoutTrailingPadding; + context->paddingLeading = layoutTraits.myLayoutPaddingLeading; + context->paddingTrailing = layoutTraits.myLayoutPaddingTrailing; context->vertGravity = MYVERTGRAVITY(layoutTraits.gravity); context->horzGravity = [MyViewTraits convertLeadingTrailingGravityFromLeftRightGravity:MYHORZGRAVITY(layoutTraits.gravity)]; context->vertSpace = layoutTraits.subviewVSpace; diff --git a/MyLayout/Lib/MyFrameLayout.m b/MyLayout/Lib/MyFrameLayout.m index e072a20..2a4cfde 100644 --- a/MyLayout/Lib/MyFrameLayout.m +++ b/MyLayout/Lib/MyFrameLayout.m @@ -19,8 +19,8 @@ - (CGSize)calcLayoutSize:(CGSize)size subviewEngines:(NSMutableArraylayoutViewEngine.currentSizeClass; context->paddingTop = layoutTraits.myLayoutPaddingTop; context->paddingBottom = layoutTraits.myLayoutPaddingBottom; - context->paddingLeading = layoutTraits.myLayoutLeadingPadding; - context->paddingTrailing = layoutTraits.myLayoutTrailingPadding; + context->paddingLeading = layoutTraits.myLayoutPaddingLeading; + context->paddingTrailing = layoutTraits.myLayoutPaddingTrailing; context->vertGravity = MYVERTGRAVITY(layoutTraits.gravity); context->horzGravity = [MyViewTraits convertLeadingTrailingGravityFromLeftRightGravity:MYHORZGRAVITY(layoutTraits.gravity)]; if (context->subviewEngines == nil) { diff --git a/MyLayout/Lib/MyGridLayout.m b/MyLayout/Lib/MyGridLayout.m index d8f64c8..c15b44f 100644 --- a/MyLayout/Lib/MyGridLayout.m +++ b/MyLayout/Lib/MyGridLayout.m @@ -629,8 +629,8 @@ - (CGSize)calcLayoutSize:(CGSize)size subviewEngines:(NSMutableArray *)subviewEn context->paddingTop = layoutTraits.myLayoutPaddingTop; context->paddingBottom = layoutTraits.myLayoutPaddingBottom; - context->paddingLeading = layoutTraits.myLayoutLeadingPadding; - context->paddingTrailing = layoutTraits.myLayoutTrailingPadding; + context->paddingLeading = layoutTraits.myLayoutPaddingLeading; + context->paddingTrailing = layoutTraits.myLayoutPaddingTrailing; context->vertGravity = MYVERTGRAVITY(layoutTraits.gravity); context->horzGravity = [MyViewTraits convertLeadingTrailingGravityFromLeftRightGravity:MYHORZGRAVITY(layoutTraits.gravity)]; context->vertSpace = layoutTraits.subviewVSpace; @@ -750,9 +750,9 @@ - (void)myTraversalGrid:(id)grid gridOrigin:(CGPoint)gridOrigin layo CGFloat paddingTrailing; if (grid == (id)layoutTraits) { paddingTop = layoutTraits.myLayoutPaddingTop; - paddingLeading = layoutTraits.myLayoutLeadingPadding; + paddingLeading = layoutTraits.myLayoutPaddingLeading; paddingBottom = layoutTraits.myLayoutPaddingBottom; - paddingTrailing = layoutTraits.myLayoutTrailingPadding; + paddingTrailing = layoutTraits.myLayoutPaddingTrailing; } else { UIEdgeInsets gridPadding = grid.padding; paddingTop = gridPadding.top; @@ -928,9 +928,9 @@ - (CGFloat)myTraversalGrid:(id)grid gridSize:(CGSize)gridSize lsc:(M CGFloat paddingTrailing; if (grid == (id)lsc) { paddingTop = lsc.myLayoutPaddingTop; - paddingLeading = lsc.myLayoutLeadingPadding; + paddingLeading = lsc.myLayoutPaddingLeading; paddingBottom = lsc.myLayoutPaddingBottom; - paddingTrailing = lsc.myLayoutTrailingPadding; + paddingTrailing = lsc.myLayoutPaddingTrailing; } else { UIEdgeInsets gridPadding = grid.padding; paddingTop = gridPadding.top; diff --git a/MyLayout/Lib/MyLayoutInner.h b/MyLayout/Lib/MyLayoutInner.h index 0a92133..d0da2db 100644 --- a/MyLayout/Lib/MyLayoutInner.h +++ b/MyLayout/Lib/MyLayoutInner.h @@ -71,8 +71,8 @@ typedef struct _MyLayoutContext { - (CGFloat)myLayoutPaddingBottom; - (CGFloat)myLayoutPaddingLeft; - (CGFloat)myLayoutPaddingRight; -- (CGFloat)myLayoutLeadingPadding; -- (CGFloat)myLayoutTrailingPadding; +- (CGFloat)myLayoutPaddingLeading; +- (CGFloat)myLayoutPaddingTrailing; - (void)myAdjustSizeSettingOfSubviewEngine:(MyLayoutEngine *)subviewEngine withContext:(MyLayoutContext *)context; diff --git a/MyLayout/Lib/MyLayoutSizeClass.h b/MyLayout/Lib/MyLayoutSizeClass.h index 3752535..25b19eb 100644 --- a/MyLayout/Lib/MyLayoutSizeClass.h +++ b/MyLayout/Lib/MyLayoutSizeClass.h @@ -190,8 +190,8 @@ - (CGFloat)myLayoutPaddingBottom; - (CGFloat)myLayoutPaddingLeft; - (CGFloat)myLayoutPaddingRight; -- (CGFloat)myLayoutLeadingPadding; -- (CGFloat)myLayoutTrailingPadding; +- (CGFloat)myLayoutPaddingLeading; +- (CGFloat)myLayoutPaddingTrailing; @property (nonatomic, assign) UIRectEdge insetsPaddingFromSafeArea; diff --git a/MyLayout/Lib/MyLayoutSizeClass.m b/MyLayout/Lib/MyLayoutSizeClass.m index 39ab759..1dec19a 100644 --- a/MyLayout/Lib/MyLayoutSizeClass.m +++ b/MyLayout/Lib/MyLayoutSizeClass.m @@ -751,7 +751,7 @@ - (CGFloat)myLayoutPaddingBottom { return self.paddingBottom; } -- (CGFloat)myLayoutLeadingPadding { +- (CGFloat)myLayoutPaddingLeading { if (self.paddingLeading >= MyLayoutPos.safeAreaMargin - 2000 && self.paddingLeading <= MyLayoutPos.safeAreaMargin + 2000) { CGFloat paddingLeadingAdd = 0; #if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000) @@ -785,7 +785,7 @@ - (CGFloat)myLayoutLeadingPadding { return self.paddingLeading + inset; } -- (CGFloat)myLayoutTrailingPadding { +- (CGFloat)myLayoutPaddingTrailing { if (self.paddingTrailing >= MyLayoutPos.safeAreaMargin - 2000 && self.paddingTrailing <= MyLayoutPos.safeAreaMargin + 2000) { CGFloat paddingTrailingAdd = 0; #if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000) @@ -820,10 +820,10 @@ - (CGFloat)myLayoutTrailingPadding { } - (CGFloat)myLayoutPaddingLeft { - return [MyViewTraits isRTL] ? [self myLayoutTrailingPadding] : [self myLayoutLeadingPadding]; + return [MyViewTraits isRTL] ? [self myLayoutPaddingTrailing] : [self myLayoutPaddingLeading]; } - (CGFloat)myLayoutPaddingRight { - return [MyViewTraits isRTL] ? [self myLayoutLeadingPadding] : [self myLayoutTrailingPadding]; + return [MyViewTraits isRTL] ? [self myLayoutPaddingLeading] : [self myLayoutPaddingTrailing]; } - (CGFloat)subviewSpace { diff --git a/MyLayout/Lib/MyLinearLayout.m b/MyLayout/Lib/MyLinearLayout.m index 5df0f07..c6da9c7 100644 --- a/MyLayout/Lib/MyLinearLayout.m +++ b/MyLayout/Lib/MyLinearLayout.m @@ -136,8 +136,8 @@ - (CGSize)calcLayoutSize:(CGSize)size subviewEngines:(NSMutableArraylayoutViewEngine.currentSizeClass; context->paddingTop = layoutTraits.myLayoutPaddingTop; context->paddingBottom = layoutTraits.myLayoutPaddingBottom; - context->paddingLeading = layoutTraits.myLayoutLeadingPadding; - context->paddingTrailing = layoutTraits.myLayoutTrailingPadding; + context->paddingLeading = layoutTraits.myLayoutPaddingLeading; + context->paddingTrailing = layoutTraits.myLayoutPaddingTrailing; context->vertGravity = MYVERTGRAVITY(layoutTraits.gravity); context->horzGravity = [MyViewTraits convertLeadingTrailingGravityFromLeftRightGravity:MYHORZGRAVITY(layoutTraits.gravity)]; context->vertSpace = layoutTraits.subviewVSpace; diff --git a/MyLayout/Lib/MyPathLayout.m b/MyLayout/Lib/MyPathLayout.m index b91faae..316d1ae 100644 --- a/MyLayout/Lib/MyPathLayout.m +++ b/MyLayout/Lib/MyPathLayout.m @@ -264,8 +264,8 @@ - (void)beginSubviewPathPoint:(BOOL)full { context.selfSize = self.bounds.size; context.paddingTop = layoutTraits.myLayoutPaddingTop; context.paddingBottom = layoutTraits.myLayoutPaddingBottom; - context.paddingLeading = layoutTraits.myLayoutLeadingPadding; - context.paddingTrailing = layoutTraits.myLayoutTrailingPadding; + context.paddingLeading = layoutTraits.myLayoutPaddingLeading; + context.paddingTrailing = layoutTraits.myLayoutPaddingTrailing; if (full) { NSMutableArray *pointIndexs = [NSMutableArray new]; @@ -351,8 +351,8 @@ - (CGPathRef)createPath:(NSInteger)subviewCount { context.selfSize = self.bounds.size; context.paddingTop = layoutTraits.myLayoutPaddingTop; context.paddingBottom = layoutTraits.myLayoutPaddingBottom; - context.paddingLeading = layoutTraits.myLayoutLeadingPadding; - context.paddingTrailing = layoutTraits.myLayoutTrailingPadding; + context.paddingLeading = layoutTraits.myLayoutPaddingLeading; + context.paddingTrailing = layoutTraits.myLayoutPaddingTrailing; CGMutablePathRef retPath = CGPathCreateMutable(); @@ -476,8 +476,8 @@ - (CGSize)calcLayoutSize:(CGSize)size subviewEngines:(NSMutableArraylayoutViewEngine.currentSizeClass; context->paddingTop = layoutTraits.myLayoutPaddingTop; context->paddingBottom = layoutTraits.myLayoutPaddingBottom; - context->paddingLeading = layoutTraits.myLayoutLeadingPadding; - context->paddingTrailing = layoutTraits.myLayoutTrailingPadding; + context->paddingLeading = layoutTraits.myLayoutPaddingLeading; + context->paddingTrailing = layoutTraits.myLayoutPaddingTrailing; if (context->subviewEngines == nil) { context->subviewEngines = [layoutTraits filterEngines:subviewEngines]; } diff --git a/MyLayout/Lib/MyRelativeLayout.m b/MyLayout/Lib/MyRelativeLayout.m index da74b0c..362b694 100644 --- a/MyLayout/Lib/MyRelativeLayout.m +++ b/MyLayout/Lib/MyRelativeLayout.m @@ -19,8 +19,8 @@ - (CGSize)calcLayoutSize:(CGSize)size subviewEngines:(NSMutableArraylayoutViewEngine.currentSizeClass; context->paddingTop = layoutTraits.myLayoutPaddingTop; context->paddingBottom = layoutTraits.myLayoutPaddingBottom; - context->paddingLeading = layoutTraits.myLayoutLeadingPadding; - context->paddingTrailing = layoutTraits.myLayoutTrailingPadding; + context->paddingLeading = layoutTraits.myLayoutPaddingLeading; + context->paddingTrailing = layoutTraits.myLayoutPaddingTrailing; context->subviewEngines = subviewEngines; if (layoutTraits.widthSizeInner.wrapVal) {