Skip to content

Commit 7820aa4

Browse files
committed
fixed hidden and visibility bug
1 parent 309a35e commit 7820aa4

13 files changed

Lines changed: 193 additions & 202 deletions

File tree

MyLayout.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
1616
#
1717

1818
s.name = "MyLayout"
19-
s.version = "1.9.9"
19+
s.version = "1.9.10"
2020
s.summary = "MyLayout is an iOS UI framework integrates the functions with Android,AutoLayout,SizeClass,HTML CSS float and flexbox,UIView UITableView."
2121

2222
s.description = <<-DESC

MyLayout.xcodeproj/project.pbxproj

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,7 @@
10321032
184082851B2C46E8003F378B /* Project object */ = {
10331033
isa = PBXProject;
10341034
attributes = {
1035-
LastUpgradeCheck = 1020;
1035+
LastUpgradeCheck = 1250;
10361036
ORGANIZATIONNAME = YoungSoft;
10371037
TargetAttributes = {
10381038
181A10B41EDF12CF00996203 = {
@@ -1382,7 +1382,7 @@
13821382
DYLIB_INSTALL_NAME_BASE = "@rpath";
13831383
INFOPLIST_FILE = MyLayout/Info.plist;
13841384
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1385-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
1385+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
13861386
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
13871387
OTHER_LDFLAGS = "";
13881388
PRODUCT_BUNDLE_IDENTIFIER = com.youngsoft.MyLayout;
@@ -1410,7 +1410,7 @@
14101410
DYLIB_INSTALL_NAME_BASE = "@rpath";
14111411
INFOPLIST_FILE = MyLayout/Info.plist;
14121412
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1413-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
1413+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
14141414
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
14151415
OTHER_LDFLAGS = "";
14161416
PRODUCT_BUNDLE_IDENTIFIER = com.youngsoft.MyLayout;
@@ -1445,6 +1445,7 @@
14451445
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
14461446
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
14471447
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
1448+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
14481449
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
14491450
CLANG_WARN_STRICT_PROTOTYPES = YES;
14501451
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -1470,7 +1471,7 @@
14701471
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
14711472
GCC_WARN_UNUSED_FUNCTION = YES;
14721473
GCC_WARN_UNUSED_VARIABLE = YES;
1473-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
1474+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
14741475
MTL_ENABLE_DEBUG_INFO = YES;
14751476
ONLY_ACTIVE_ARCH = YES;
14761477
OTHER_LDFLAGS = "";
@@ -1501,6 +1502,7 @@
15011502
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
15021503
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
15031504
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
1505+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
15041506
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
15051507
CLANG_WARN_STRICT_PROTOTYPES = YES;
15061508
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -1519,7 +1521,7 @@
15191521
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
15201522
GCC_WARN_UNUSED_FUNCTION = YES;
15211523
GCC_WARN_UNUSED_VARIABLE = YES;
1522-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
1524+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
15231525
MTL_ENABLE_DEBUG_INFO = NO;
15241526
OTHER_LDFLAGS = "";
15251527
SDKROOT = iphoneos;
@@ -1538,7 +1540,7 @@
15381540
DEVELOPMENT_TEAM = BGQ8WB468K;
15391541
GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1";
15401542
INFOPLIST_FILE = "$(SRCROOT)/MyLayoutDemo/Info.plist";
1541-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
1543+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
15421544
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
15431545
OTHER_LDFLAGS = "-ObjC";
15441546
PRODUCT_BUNDLE_IDENTIFIER = com.meituan.MyLayoutDemo;
@@ -1560,7 +1562,7 @@
15601562
DEVELOPMENT_TEAM = BGQ8WB468K;
15611563
GCC_PREPROCESSOR_DEFINITIONS = "";
15621564
INFOPLIST_FILE = "$(SRCROOT)/MyLayoutDemo/Info.plist";
1563-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
1565+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
15641566
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
15651567
OTHER_LDFLAGS = "-ObjC";
15661568
PRODUCT_BUNDLE_IDENTIFIER = com.meituan.MyLayoutDemo;
@@ -1619,7 +1621,7 @@
16191621
DEBUG_INFORMATION_FORMAT = dwarf;
16201622
DEVELOPMENT_TEAM = BGQ8WB468K;
16211623
INFOPLIST_FILE = MyLayoutUITests/Info.plist;
1622-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
1624+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
16231625
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
16241626
PRODUCT_BUNDLE_IDENTIFIER = com.youngsoft.MyLayoutUITests;
16251627
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -1637,7 +1639,7 @@
16371639
CLANG_WARN_SUSPICIOUS_MOVES = YES;
16381640
DEVELOPMENT_TEAM = BGQ8WB468K;
16391641
INFOPLIST_FILE = MyLayoutUITests/Info.plist;
1640-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
1642+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
16411643
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
16421644
PRODUCT_BUNDLE_IDENTIFIER = com.youngsoft.MyLayoutUITests;
16431645
PRODUCT_NAME = "$(TARGET_NAME)";

MyLayout.xcodeproj/xcshareddata/xcschemes/MyLayout.xcscheme

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1020"
3+
LastUpgradeVersion = "1250"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -29,8 +29,6 @@
2929
shouldUseLaunchSchemeArgsEnv = "YES">
3030
<Testables>
3131
</Testables>
32-
<AdditionalOptions>
33-
</AdditionalOptions>
3432
</TestAction>
3533
<LaunchAction
3634
buildConfiguration = "Debug"
@@ -51,8 +49,6 @@
5149
ReferencedContainer = "container:MyLayout.xcodeproj">
5250
</BuildableReference>
5351
</MacroExpansion>
54-
<AdditionalOptions>
55-
</AdditionalOptions>
5652
</LaunchAction>
5753
<ProfileAction
5854
buildConfiguration = "Release"

MyLayout.xcodeproj/xcshareddata/xcschemes/MyLayoutDemo.xcscheme

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1020"
3+
LastUpgradeVersion = "1250"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,8 +26,17 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29-
codeCoverageEnabled = "YES"
30-
shouldUseLaunchSchemeArgsEnv = "YES">
29+
shouldUseLaunchSchemeArgsEnv = "YES"
30+
codeCoverageEnabled = "YES">
31+
<MacroExpansion>
32+
<BuildableReference
33+
BuildableIdentifier = "primary"
34+
BlueprintIdentifier = "1840828C1B2C46E8003F378B"
35+
BuildableName = "MyLayoutDemo.app"
36+
BlueprintName = "MyLayoutDemo"
37+
ReferencedContainer = "container:MyLayout.xcodeproj">
38+
</BuildableReference>
39+
</MacroExpansion>
3140
<Testables>
3241
<TestableReference
3342
skipped = "NO">
@@ -50,17 +59,6 @@
5059
</BuildableReference>
5160
</TestableReference>
5261
</Testables>
53-
<MacroExpansion>
54-
<BuildableReference
55-
BuildableIdentifier = "primary"
56-
BlueprintIdentifier = "1840828C1B2C46E8003F378B"
57-
BuildableName = "MyLayoutDemo.app"
58-
BlueprintName = "MyLayoutDemo"
59-
ReferencedContainer = "container:MyLayout.xcodeproj">
60-
</BuildableReference>
61-
</MacroExpansion>
62-
<AdditionalOptions>
63-
</AdditionalOptions>
6462
</TestAction>
6563
<LaunchAction
6664
buildConfiguration = "Debug"
@@ -82,8 +80,6 @@
8280
ReferencedContainer = "container:MyLayout.xcodeproj">
8381
</BuildableReference>
8482
</BuildableProductRunnable>
85-
<AdditionalOptions>
86-
</AdditionalOptions>
8783
</LaunchAction>
8884
<ProfileAction
8985
buildConfiguration = "Release"

MyLayout/Lib/MyBaseLayout.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@
585585
直接更新window下所有布局视图的RTL特性。
586586
*/
587587
+ (void)updateRTL:(BOOL)isRTL inWindow:(UIWindow *)window;
588-
+ (void)myUpArabicUI:(BOOL)isArabicUI inWindow:(UIWindow *)window MYDEPRECATED("use updateRTL:inWindow: instead");
588+
//+ (void)myUpArabicUI:(BOOL)isArabicUI inWindow:(UIWindow *)window MYDEPRECATED("use updateRTL:inWindow: instead");
589589

590590
/*
591591
布局视图里面的padding属性用来设置布局视图的内边距。内边距是指布局视图里面的子视图离自己距离。外边距则是视图与父视图之间的距离。
@@ -1010,7 +1010,7 @@
10101010
/**
10111011
*!!!不建议使用这个属性了,而是直接设置视图的高度为MyLayoutSize.wrap。 比如:myHeight = MyLayoutSize.wrap 或者 heightSize.equalTo(@(MyLayoutSize.wrap))。
10121012
*获取和判断的时候可以通过 myHeight == MyLayoutSize.wrap 或者 heightSize.isWrap 来比较判断
1013-
1013+
10141014
*视图的高度包裹属性,表示视图的高度由所有子视图的整体高度来确定或者根据视图内容来高度自适应。默认值是NO(垂直线性布局默认这个属性是YES),表示必须要明确指定布局的高度,而当设置为YES时则不需要明确的指定视图的高度了。这个属性不能和heightSize(或者设置了上下边距)同时设置否则可能会产生约束冲突,因为前者表明高度由子视图或者内容来决定而后者则表示高度是一个明确的值。如果同时设置了高度包裹属性又同时设置了明确的高度则系统会出现约束冲突告警,虽然如此,系统在布局时做了一些优化,如果同时设置了明确的高度和高度包裹则会在布局前将高度包裹属性置为NO。如果某个非布局视图指定了明确的宽度,而又将这个属性设置为了YES的话就能实现在固定宽度的情况下视图的高度根据内容自适应的效果,这个特性主要用于UILabel,UITextView以及实现了sizeThatFits方法的视图来实现高度根据内容自适应的场景。UILabel在使用这个属性时会自动设置numberOfLines为0,因此如果您要修改numberOfLines则需要在设置这个属性后进行;UITextView可以用这个属性以及heightSize中的max方法来实现到达指定的高度后若继续输入则产生滚动的效果;UIImageView可以用这个属性来在实现在确定宽度的情况下高度根据宽度的缩放情况进行等比例的缩放。
10151015
*/
10161016
@property (nonatomic, assign) BOOL wrapContentHeight;
@@ -1025,13 +1025,13 @@
10251025

10261026
@end
10271027

1028-
@interface MyBaseLayout(MyDeprecated)
1029-
1030-
@property (nonatomic, assign) CGFloat topPadding MYDEPRECATED("use paddingTop instead");
1031-
@property (nonatomic, assign) CGFloat leadingPadding MYDEPRECATED("use paddingLeading instead");
1032-
@property (nonatomic, assign) CGFloat bottomPadding MYDEPRECATED("use paddingBottom instead");
1033-
@property (nonatomic, assign) CGFloat trailingPadding MYDEPRECATED("use paddingTrailing instead");
1034-
@property (nonatomic, assign) CGFloat leftPadding MYDEPRECATED("use paddingLeft instead");
1035-
@property (nonatomic, assign) CGFloat rightPadding MYDEPRECATED("use paddingRight instead");
1036-
1037-
@end
1028+
//@interface MyBaseLayout(MyDeprecated)
1029+
//
1030+
//@property (nonatomic, assign) CGFloat topPadding MYDEPRECATED("use paddingTop instead");
1031+
//@property (nonatomic, assign) CGFloat leadingPadding MYDEPRECATED("use paddingLeading instead");
1032+
//@property (nonatomic, assign) CGFloat bottomPadding MYDEPRECATED("use paddingBottom instead");
1033+
//@property (nonatomic, assign) CGFloat trailingPadding MYDEPRECATED("use paddingTrailing instead");
1034+
//@property (nonatomic, assign) CGFloat leftPadding MYDEPRECATED("use paddingLeft instead");
1035+
//@property (nonatomic, assign) CGFloat rightPadding MYDEPRECATED("use paddingRight instead");
1036+
//
1037+
//@end

MyLayout/Lib/MyBaseLayout.m

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -539,9 +539,9 @@ + (void)setIsRTL:(BOOL)isRTL {
539539
+ (void)updateRTL:(BOOL)isRTL inWindow:(UIWindow *)window {
540540
[window myUpdateRTL:isRTL];
541541
}
542-
+ (void)myUpArabicUI:(BOOL)isArabicUI inWindow:(UIWindow *)window {
543-
[self updateRTL:isArabicUI inWindow:window];
544-
}
542+
//+ (void)myUpArabicUI:(BOOL)isArabicUI inWindow:(UIWindow *)window {
543+
// [self updateRTL:isArabicUI inWindow:window];
544+
//}
545545

546546
- (CGFloat)paddingTop {
547547
return self.myDefaultSizeClassInner.paddingTop;
@@ -988,7 +988,7 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(UIView *)object cha
988988
}
989989

990990
//监控子视图的frame的变化以便重新进行布局
991-
if (!_isMyLayouting) {
991+
if (!self.isMyLayouting) {
992992
if (context == _myObserverContextA) {
993993
if (!object.myCurrentSizeClassInner.useFrame) {
994994
[self setNeedsLayout];
@@ -1292,10 +1292,10 @@ - (void)safeAreaInsetsDidChange {
12921292
self.trailingPosInner.isSafeAreaPos ||
12931293
self.topPosInner.isSafeAreaPos ||
12941294
self.bottomPosInner.isSafeAreaPos)) {
1295-
if (!_isMyLayouting) {
1296-
_isMyLayouting = YES;
1295+
if (!self.isMyLayouting) {
1296+
self.isMyLayouting = YES;
12971297
[self myUpdateLayoutRectInNoLayoutSuperview:self.superview];
1298-
_isMyLayouting = NO;
1298+
self.isMyLayouting = NO;
12991299
}
13001300
}
13011301
}
@@ -2806,55 +2806,55 @@ - (void)myCalcSubviewsWrapContentSize:(MyLayoutContext *)context withCustomSetti
28062806
}
28072807

28082808
#pragma mark -- Deprecated methods
2809-
2810-
2811-
- (CGFloat)topPadding {
2812-
return self.paddingTop;
2813-
}
2814-
2815-
- (void)setTopPadding:(CGFloat)topPadding {
2816-
self.paddingTop = topPadding;
2817-
}
2818-
2819-
- (CGFloat)leadingPadding {
2820-
return self.paddingLeading;
2821-
}
2822-
2823-
- (void)setLeadingPadding:(CGFloat)leadingPadding {
2824-
self.paddingLeading = leadingPadding;
2825-
}
2826-
2827-
- (CGFloat)bottomPadding {
2828-
return self.paddingBottom;
2829-
}
2830-
2831-
- (void)setBottomPadding:(CGFloat)bottomPadding {
2832-
self.paddingBottom = bottomPadding;
2833-
}
2834-
2835-
- (CGFloat)trailingPadding {
2836-
return self.paddingTrailing;
2837-
}
2838-
2839-
- (void)setTrailingPadding:(CGFloat)trailingPadding {
2840-
self.paddingTrailing = trailingPadding;
2841-
}
2842-
2843-
- (CGFloat)leftPadding {
2844-
return self.paddingLeft;
2845-
}
2846-
2847-
- (void)setLeftPadding:(CGFloat)leftPadding {
2848-
self.paddingLeft = leftPadding;
2849-
}
2850-
2851-
- (CGFloat)rightPadding {
2852-
return self.paddingRight;
2853-
}
2854-
2855-
- (void)setRightPadding:(CGFloat)rightPadding {
2856-
self.paddingRight = rightPadding;
2857-
}
2809+
//
2810+
//
2811+
//- (CGFloat)topPadding {
2812+
// return self.paddingTop;
2813+
//}
2814+
//
2815+
//- (void)setTopPadding:(CGFloat)topPadding {
2816+
// self.paddingTop = topPadding;
2817+
//}
2818+
//
2819+
//- (CGFloat)leadingPadding {
2820+
// return self.paddingLeading;
2821+
//}
2822+
//
2823+
//- (void)setLeadingPadding:(CGFloat)leadingPadding {
2824+
// self.paddingLeading = leadingPadding;
2825+
//}
2826+
//
2827+
//- (CGFloat)bottomPadding {
2828+
// return self.paddingBottom;
2829+
//}
2830+
//
2831+
//- (void)setBottomPadding:(CGFloat)bottomPadding {
2832+
// self.paddingBottom = bottomPadding;
2833+
//}
2834+
//
2835+
//- (CGFloat)trailingPadding {
2836+
// return self.paddingTrailing;
2837+
//}
2838+
//
2839+
//- (void)setTrailingPadding:(CGFloat)trailingPadding {
2840+
// self.paddingTrailing = trailingPadding;
2841+
//}
2842+
//
2843+
//- (CGFloat)leftPadding {
2844+
// return self.paddingLeft;
2845+
//}
2846+
//
2847+
//- (void)setLeftPadding:(CGFloat)leftPadding {
2848+
// self.paddingLeft = leftPadding;
2849+
//}
2850+
//
2851+
//- (CGFloat)rightPadding {
2852+
// return self.paddingRight;
2853+
//}
2854+
//
2855+
//- (void)setRightPadding:(CGFloat)rightPadding {
2856+
// self.paddingRight = rightPadding;
2857+
//}
28582858

28592859
@end
28602860

0 commit comments

Comments
 (0)