You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
***Breaking change related to hCenter(CGFloat), hCenter(percent), vCenter(CGFloat), vCenter(percent)**:
14
+
***`vCenter(_ value: CGFloat)`** and **`vCenter(_ percent: Percent)`**:
15
+
The value specifies the distance vertically of the view's center **related to the superview's center** in pixels. Previously it was related to the **superview's top edge**.
16
+
***`hCenter(_ value: CGFloat)`** and **`hCenter(_ percent: Percent)`**:
17
+
The value specifies the distance horizontally of the view's center **related to the superview's center** in pixels. Previously it was related to the **superview's left edge**.
Copy file name to clipboardExpand all lines: Example/PinLayoutSample/UI/Examples/TableViewExample/TableViewExampleViewController.swift
+8-7Lines changed: 8 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -52,16 +52,17 @@ class TableViewExampleViewController: BaseViewController {
52
52
mainView.configure(methods:[
53
53
Method(name:"top(_ value: CGFloat)", description:"The value specifies the top edge distance from the superview's top edge in pixels."),
54
54
Method(name:"top(_ percent: Percent)", description:"The value specifies the top edge distance from the superview's top edge in percentage of its superview's height."),
55
-
Method(name:"left(_ value: CGFloat)", description:"The value specifies the left edge distance from the superview's left edge in pixels. The value specifies the left edge distance from the superview's left edge in pixels."),
56
-
Method(name:"left(_ percent: Percent)", description:"The value specifies the left edge distance from the superview's left edge in percentage of its superview's width."),
55
+
Method(name:"vCenter(_ value: CGFloat)", description:"The value specifies the distance vertically of the view's center related to the superview's center in pixels."),
56
+
Method(name:"vCenter(_ percent: Percent)", description:"The value specifies the distance vertically of the view's center related to the superview's center in percentage of its superview's height."),
57
57
Method(name:"bottom(_ value: CGFloat)", description:"The value specifies the bottom edge distance from the superview's bottom edge in pixels."),
58
58
Method(name:"bottom(_ percent: Percent)", description:"The value specifies the bottom edge distance from the superview's bottom edge in percentage of its superview's height."),
59
+
60
+
Method(name:"left(_ value: CGFloat)", description:"The value specifies the left edge distance from the superview's left edge in pixels. The value specifies the left edge distance from the superview's left edge in pixels."),
61
+
Method(name:"left(_ percent: Percent)", description:"The value specifies the left edge distance from the superview's left edge in percentage of its superview's width."),
62
+
Method(name:"hCenter(_ value: CGFloat)", description:"The value specifies the distance horizontally of the view's center related to the superview's center in pixels."),
63
+
Method(name:"hCenter(_ percent: Percent)", description:"The value specifies the distance horizontally of the view's center related to the superview's center in percentage of its superview's height."),
59
64
Method(name:"right(_ value: CGFloat)", description:"The value specifies the right edge distance from the superview's right edge in pixels."),
60
-
Method(name:"right(_ percent: Percent)", description:"The value specifies the right edge distance from the superview's right edge in percentage of its superview's width."),
61
-
Method(name:"hCenter(_ value: CGFloat)", description:"The value specifies the horizontal center distance from the superview's left edge in pixels."),
62
-
Method(name:"hCenter(_ percent: Percent)", description:"The value specifies the horizontal center distance from the superview's left edge in percentage of its superview's width."),
63
-
Method(name:"vCenter(_ value: CGFloat)", description:"The value specifies the vertical center distance from the superview's top edge in pixels."),
64
-
Method(name:"vCenter(_ percent: Percent)", description:"The value specifies the vertical center distance from the superview's top edge in percentage of its superview's height.")
65
+
Method(name:"right(_ percent: Percent)", description:"The value specifies the right edge distance from the superview's right edge in percentage of its superview's width.")
Copy file name to clipboardExpand all lines: PinLayout.podspec
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
16
16
#
17
17
18
18
s.name="PinLayout"
19
-
s.version="1.2.4"
19
+
s.version="1.3.0"
20
20
s.summary="Fast Swift UIViews layouting without auto layout. No magic, pure code, full control and blazing fast. Concise syntax, intuitive, readable & chainable."
21
21
22
22
# This description is used to generate tags and improve search results.
@@ -221,9 +220,9 @@ The value specifies the top edge distance from the superview's top edge in pixel
221
220
***`top(_ percent: Percent)`**
222
221
The value specifies the top edge distance from the superview's top edge in percentage of its superview's height.
223
222
***`vCenter(_ value: CGFloat)`**
224
-
The value specifies the vertical center distance from the superview's top edge in pixels.
223
+
The value specifies the distance vertically of the view's center related to the superview's center in pixels. A positive value move the view down and a negative value move it up relative to the superview's center.
225
224
***`vCenter(_ percent: Percent)`**
226
-
The value specifies the vertical center distance from the superview's top edge in percentage of its superview's height.
225
+
The value specifies the distance vertically of the view's center related to the superview's center in percentage of its superview's height. A positive value move the view down and a negative value move it up relative to the superview's center.
227
226
***`bottom(_ value: CGFloat)`**
228
227
The value specifies the bottom edge **distance from the superview's bottom edge** in pixels.
229
228
***`bottom(_ percent: Percent)`**
@@ -233,9 +232,9 @@ The value specifies the left edge distance from the superview's left edge in pix
233
232
***`left(_ percent: Percent)`**
234
233
The value specifies the left edge distance from the superview's left edge in percentage of its superview's width.
235
234
***`hCenter(_ value: CGFloat)`**
236
-
The value specifies the horizontal center distance from the superview's left edge in pixels.
235
+
The value specifies the distance horizontally of the view's center related to the superview's center in pixels. A positive value move the view to the right and a negative value move it to the left relative to the superview's center.
237
236
***`hCenter(_ percent: Percent)`**
238
-
The value specifies the horizontal center distance from the superview's left edge in percentage of its superview's width.
237
+
The value specifies the distance horizontally of the view's center related to the superview's center in percentage of its superview's width. A positive value move the view to the right and a negative value move it to the left relative to the superview's center.
239
238
***`right(_ value: CGFloat)`**
240
239
The value specifies the right edge **distance from the superview's right edge** in pixels.
241
240
***`right(_ percent: Percent)`**
@@ -256,9 +255,9 @@ In RTL direction the value specifies the left edge distance from the superview's
256
255
###### Usage Examples:
257
256
258
257
```swift
259
-
view.pin.top(20).left(20)
260
-
view.pin.top(25%).hCenter(0)
261
-
view.pin.left(12).vCenter(100)
258
+
view.pin.top(20).bottom(20)// The view has a top margin and a bottom margin of 20 pixels
259
+
view.pin.top(25%).hCenter(0)// The view is centered horizontally
260
+
view.pin.left(12).vCenter(0) // The view is centered vertically
262
261
view.pin.start(20).end(20)
263
262
```
264
263
@@ -373,17 +372,23 @@ In RTL direction it position the view's bottom edge directly on another view’s
0 commit comments