A Simple Demo to use MyLayout

suggest change
  1. There is a container view S which width is 100 and height is wrap to
all subviews height. there are four subviews A,B,C,D arranged from
top to bottom.
  1. Subview A’s left margin is 20% width of S, right margin is 30% width of S, height is equal to width of A.
  2. Subview B’s left margin is 40, width is filled in to residual width
of S,height is 40. Subview C's width is filled in to S, height is
40.
  1. Subview D’s right margin is 20, width is 50% width of S, height is 40

like below figure:

demo

MyLinearLayout *S = [MyLinearLayout linearLayoutWithOrientation:MyLayoutViewOrientation_Vert]; S.subviewSpace = 10;

S.widthSize.equalTo(@100);

UIView *A = UIView.new; A.leftPos.equalTo(@0.2); A.rightPos.equalTo(@0.3); A.heightSize.equalTo(A.widthSize); [S addSubview:A];

UIView *B = UIView.new; B.leftPos.equalTo(@40); B.widthSize.equalTo(@60); B.heightSize.equalTo(@40); [S addSubview:B];

UIView *C = UIView.new; C.leftPos.equalTo(@0); C.rightPos.equalTo(@0); C.heightSize.equalTo(@40); [S addSubview:C];

UIView *D = UIView.new; D.rightPos.equalTo(@20); D.widthSize.equalTo(S.widthSize).multiply(0.5); D.heightSize.equalTo(@40); [S addSubview:D];

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


MyLayout:
* A Simple Demo to use MyLayout

Table Of Contents
12 UIView
15 UIColor
26 UIImage
28 CALayer
30 NSDate
40 iBeacon
49 NSTimer
79 NSURL
87 AWS SDK
96 NSData
101 Segues
104 EventKit
105 NSBundle
106 SiriKit
111 StoreKit
117 3D Touch
119 Keychain
122 Block
141 AirDrop
144 UISlider
145 Carthage
146 HealthKit
151 plist
157 MVVM
164 UIPhoenix
166 Simulator
168 NSArray
169 OpenGL
175 Core Data
179 MyLayout
180 UIFont
189 Security
200 Codable