Skip to content

Commit 4f89fa9

Browse files
author
@欧柏泉
committed
issue v1.2.7 . you can open MyLayout.h to see what functions be added and bugs be fixed.
1 parent 48cbca6 commit 4f89fa9

36 files changed

+1132
-93
lines changed

MyLayout.podspec

+2-2
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.2.6"
19+
s.version = "1.2.7"
2020
s.summary = "MyLayout is A powerful iOS UI framework. It integrated the Android layout,AutoLayout,SizeClass, HTML/CSS float and flexbox functions."
2121

2222
s.description = <<-DESC
@@ -79,7 +79,7 @@ Pod::Spec.new do |s|
7979
# Supports git, hg, bzr, svn and HTTP.
8080
#
8181

82-
s.source = { :git => "https://github.com/youngsoft/MyLinearLayout.git", :tag => "1.2.6" }
82+
s.source = { :git => "https://github.com/youngsoft/MyLinearLayout.git", :tag => "1.2.7" }
8383

8484

8585
# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #

MyLayout.xcodeproj/project.pbxproj

+6-2
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
18D684591C4F423400A48BB4 /* MyLayoutTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 18D684551C4F423400A48BB4 /* MyLayoutTests.m */; };
6969
18DBC56A1CFB451800BD73D2 /* FOLTest4ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 18DBC5691CFB451800BD73D2 /* FOLTest4ViewController.m */; };
7070
18DC7F551CF5510F008E5FCB /* AllTest1TableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 18DC7F541CF5510F008E5FCB /* AllTest1TableViewCell.m */; };
71+
18DF8A1B1DD83A9A009FD703 /* layoutdemo8.gif in Resources */ = {isa = PBXBuildFile; fileRef = 18DF8A1A1DD83A9A009FD703 /* layoutdemo8.gif */; };
7172
18E7C5181D47A1CA00F61A3E /* PLTest1ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 18E7C5171D47A1CA00F61A3E /* PLTest1ViewController.m */; };
7273
18E7C51B1D47BA9400F61A3E /* PLTest2ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 18E7C51A1D47BA9400F61A3E /* PLTest2ViewController.m */; };
7374
18E8084D1B3A5D170059C410 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 18E8084C1B3A5D170059C410 /* QuartzCore.framework */; };
@@ -227,6 +228,7 @@
227228
18DBC5691CFB451800BD73D2 /* FOLTest4ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FOLTest4ViewController.m; sourceTree = "<group>"; };
228229
18DC7F531CF5510F008E5FCB /* AllTest1TableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AllTest1TableViewCell.h; sourceTree = "<group>"; };
229230
18DC7F541CF5510F008E5FCB /* AllTest1TableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AllTest1TableViewCell.m; sourceTree = "<group>"; };
231+
18DF8A1A1DD83A9A009FD703 /* layoutdemo8.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = layoutdemo8.gif; sourceTree = "<group>"; };
230232
18E7C5161D47A1CA00F61A3E /* PLTest1ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PLTest1ViewController.h; sourceTree = "<group>"; };
231233
18E7C5171D47A1CA00F61A3E /* PLTest1ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PLTest1ViewController.m; sourceTree = "<group>"; };
232234
18E7C5191D47BA9400F61A3E /* PLTest2ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PLTest2ViewController.h; sourceTree = "<group>"; };
@@ -352,6 +354,8 @@
352354
46DB7E6A1C54B4BC001B409D /* AllTest5ViewController.m */,
353355
188261CD1C647CB300996C2C /* AllTest6ViewController.h */,
354356
188261CE1C647CB300996C2C /* AllTest6ViewController.m */,
357+
183C14611DB9DD1A00C38448 /* AllTest7ViewController.h */,
358+
183C14621DB9DD1A00C38448 /* AllTest7ViewController.m */,
355359
18D683F31C4F421400A48BB4 /* FLLTest1ViewController.h */,
356360
18D683F41C4F421400A48BB4 /* FLLTest1ViewController.m */,
357361
1890A22C1C6DD71600373B8B /* FLLTest2ViewController.h */,
@@ -414,8 +418,6 @@
414418
18C8F1631D4DA6B800DC1FD3 /* PLTest3ViewController.m */,
415419
18C8F1651D4E3E4E00DC1FD3 /* PLTest4ViewController.h */,
416420
18C8F1661D4E3E4E00DC1FD3 /* PLTest4ViewController.m */,
417-
183C14611DB9DD1A00C38448 /* AllTest7ViewController.h */,
418-
183C14621DB9DD1A00C38448 /* AllTest7ViewController.m */,
419421
);
420422
path = MyLayout;
421423
sourceTree = "<group>";
@@ -480,6 +482,7 @@
480482
1888CE7F1D0BE44300968C0C /* layoutdemo3.gif */,
481483
1888CE801D0BE44300968C0C /* layoutdemo2.gif */,
482484
1888CE811D0BE44300968C0C /* layoutdemo1.gif */,
485+
18DF8A1A1DD83A9A009FD703 /* layoutdemo8.gif */,
483486
186B83D91D090DE6001CA155 /* zh-Hans.lproj */,
484487
186B83CE1D08F7B9001CA155 /* Base.lproj */,
485488
18D683F91C4F421400A48BB4 /* Images.xcassets */,
@@ -574,6 +577,7 @@
574577
186B83DE1D090DE6001CA155 /* LaunchScreen.strings in Resources */,
575578
186B83E01D094F11001CA155 /* FLLTest2ViewController.xib in Resources */,
576579
186B83DF1D090DE6001CA155 /* Localizable.strings in Resources */,
580+
18DF8A1B1DD83A9A009FD703 /* layoutdemo8.gif in Resources */,
577581
186B83D41D08F7B9001CA155 /* LaunchScreen.xib in Resources */,
578582
18D684391C4F421400A48BB4 /* Images.xcassets in Resources */,
579583
);

MyLayout/AllTest3ViewController.m

+4-2
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ -(void)addHideSubviewReLayoutLayout:(MyLinearLayout *)contentLayout
229229
[centerButton addTarget:self action:@selector(handleHideSelf:) forControlEvents:UIControlEventTouchUpInside];
230230
centerButton.backgroundColor = [UIColor redColor];
231231
[centerButton sizeToFit];
232+
centerButton.weight = 1; //均分剩余的宽度。
232233
[testLayout addSubview:centerButton];
233234
self.hiddenTestButton = centerButton;
234235

@@ -237,6 +238,7 @@ -(void)addHideSubviewReLayoutLayout:(MyLinearLayout *)contentLayout
237238
[rightButton addTarget:self action:@selector(handleShowBrother:) forControlEvents:UIControlEventTouchUpInside];
238239
rightButton.backgroundColor = [UIColor blueColor];
239240
[rightButton sizeToFit];
241+
rightButton.weight = 1; //均分剩余的宽度。
240242
[testLayout addSubview:rightButton];
241243

242244
}
@@ -375,14 +377,14 @@ -(MyLinearLayout*)createSwitchLayout:(NSString*)title action:(SEL)action
375377
label.font = [UIFont systemFontOfSize:14];
376378
label.adjustsFontSizeToFitWidth = YES;
377379
[label sizeToFit];
378-
label.rightPos.equalTo(@0.5).min(0); //设置右间距为相对距离,并且最小为0
380+
label.weight = 1;
379381
[switchLayout addSubview:label];
380382

381383

382384

383385
UISwitch *switchCtrl = [UISwitch new];
384386
[switchCtrl addTarget:self action:action forControlEvents:UIControlEventValueChanged];
385-
switchCtrl.leftPos.equalTo(@0.5);
387+
switchCtrl.rightPos.min(5);
386388
[switchLayout addSubview:switchCtrl];
387389

388390
return switchLayout;

MyLayout/AllTest6ViewController.m

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ -(void)loadView
2323
*/
2424

2525
MyLinearLayout *rootLayout = [MyLinearLayout linearLayoutWithOrientation:MyLayoutViewOrientation_Vert];
26+
rootLayout.wrapContentHeight = NO;
2627
rootLayout.gravity = MyMarginGravity_Horz_Fill;
2728
self.view = rootLayout;
2829

0 commit comments

Comments
 (0)