Skip to content

Commit e2917b5

Browse files
authored
Merge branch 'master' into add_wrapContent_example
2 parents 9bd9fab + 6c611e4 commit e2917b5

File tree

15 files changed

+133
-130
lines changed

15 files changed

+133
-130
lines changed

CHANGELOG.md

Lines changed: 83 additions & 80 deletions
Large diffs are not rendered by default.

PinLayout.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ Pod::Spec.new do |spec|
1111
spec.version = "1.7.6"
1212
spec.summary = "Fast Swift Views layouting without auto layout. No magic, pure code, full control and blazing fast. [iOS/macOS/tvOS]"
1313
spec.description = "Fast Swift Views layouting without auto layout. No magic, pure code, full control and blazing fast. Concise syntax, intuitive, readable & chainable. [iOS/macOS/tvOS]"
14-
spec.homepage = "https://mirego.github.io/PinLayout/"
14+
spec.homepage = "https://github.com/layoutBox/PinLayout"
1515
spec.license = "MIT license"
1616
spec.author = { "Luc Dion" => "[email protected]" }
17-
spec.source = { :git => "https://github.com/mirego/PinLayout.git", :tag => "#{spec.version}" }
17+
spec.source = { :git => "https://github.com/layoutBox/PinLayout.git", :tag => "#{spec.version}" }
1818
spec.source_files = "Sources/**/*.swift"
1919
spec.swift_version = '4.0'
2020

README.md

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
<p align="center">
2-
<a href="https://github.com/mirego/PinLayout"><img src="docs/pinlayout-logo-text.png" alt="PinLayout" width="200" /></a>
2+
<a href="https://github.com/layoutBox/PinLayout"><img src="docs/pinlayout-logo-text.png" alt="PinLayout" width="200" /></a>
33
</p>
44

55
<p align="center">
6-
<a href="https://github.com/mirego/PinLayout"><img src="https://img.shields.io/badge/platforms-iOS%20%7C%20tvOS%20%7C%20macOS-red.svg"/></a>
7-
<a href="https://github.com/mirego/PinLayout"><img src="https://img.shields.io/badge/languages-Swift%20%7C%20ObjC-red.svg"/></a>
6+
<a href="https://github.com/layoutBox/PinLayout"><img src="https://img.shields.io/badge/platforms-iOS%20%7C%20tvOS%20%7C%20macOS-red.svg"/></a>
7+
<a href="https://github.com/layoutBox/PinLayout"><img src="https://img.shields.io/badge/languages-Swift%20%7C%20ObjC-red.svg"/></a>
88
</p>
99

1010
<p align="center">
1111
<a href='https://cocoapods.org/pods/PinLayout'><img src="https://img.shields.io/cocoapods/v/PinLayout.svg?style=flat" />
1212
<a href="https://github.com/Carthage/Carthage"><img src="https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat" /></a>
1313
<a href="https://swift.org/package-manager/"><img src="https://camo.githubusercontent.com/57aa80b42087a088cdf607fb98c0224bccf1b441/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73706d2d636f6d70617469626c652d627269676874677265656e2e7376673f7374796c653d666c6174" /></a>
14-
<a href="https://travis-ci.org/mirego/PinLayout"><img src="https://travis-ci.org/mirego/PinLayout.svg?branch=master&colorB=28B9FE" /></a>
15-
<a href="https://codecov.io/gh/mirego/PinLayout"><img src="https://codecov.io/gh/mirego/PinLayout/branch/master/graph/badge.svg"/></a>
16-
<a href="https://raw.githubusercontent.com/mirego/PinLayout/master/LICENSE"><img src="https://img.shields.io/cocoapods/l/PinLayout.svg" /></a>
14+
<a href="https://travis-ci.org/layoutBox/PinLayout"><img src="https://travis-ci.org/layoutBox/PinLayout.svg?branch=master&colorB=28B9FE" /></a>
15+
<a href="https://codecov.io/gh/layoutBox/PinLayout"><img src="https://codecov.io/gh/layoutBox/PinLayout/branch/master/graph/badge.svg"/></a>
16+
<a href="https://raw.githubusercontent.com/layoutBox/PinLayout/master/LICENSE"><img src="https://img.shields.io/cocoapods/l/PinLayout.svg" /></a>
1717
</p>
1818

1919
<!--p align="center">
@@ -23,7 +23,7 @@
2323
<a href='https://cocoapods.org/pods/PinLayout'><img src="https://img.shields.io/cocoapods/at/PinLayout.svg?label=Apps%20Using%20PinLayout&colorB=317cb0"/></a>
2424
</p-->
2525

26-
<!--<a href="https://github.com/mirego/PinLayout/issues"><img src="https://img.shields.io/github/issues/mirego/PinLayout.svg?style=flat" /></a>-->
26+
<!--<a href="https://github.com/layoutBox/PinLayout/issues"><img src="https://img.shields.io/github/issues/layoutBox/PinLayout.svg?style=flat" /></a>-->
2727

2828

2929
Extremely Fast views layouting without auto layout. No magic, pure code, full control and blazing fast. Concise syntax, intuitive, readable & chainable.
@@ -83,7 +83,7 @@ Extremely Fast views layouting without auto layout. No magic, pure code, full co
8383

8484
### PinLayout + FlexLayout
8585

86-
<a href="https://github.com/mirego/PinLayout"><img src="docs/images/pinlayout_plus_flexlayout_small.png" alt="FlexLayout" width="200"/></a>
86+
<a href="https://github.com/layoutBox/PinLayout"><img src="docs/images/pinlayout_plus_flexlayout_small.png" alt="FlexLayout" width="200"/></a>
8787

8888
**PinLayout** is a companion of **[FlexLayout](https://github.com/layoutBox/FlexLayout)**. They share a similar syntax and method names. FlexLayout is a flexbox implementation. A view can layouts its subviews using PinLayout, FlexLayout, or both! FlexLayout it is particularly useful in situations where you need to layouts many views but don't require the PinLayout's finest control nor complex animations.
8989

@@ -104,7 +104,7 @@ This example layout an image, a UISegmentedControl, a label and a line separator
104104
* **Separator** is below the UIImageView and the UILabel, i.e. below the tallest one. The separator has a top margin of 10 pixels, left-aligned to the UIImageView and right-aligned to the UISegmentedControl.
105105

106106

107-
<a href="https://github.com/mirego/PinLayout/blob/master/Example/PinLayoutSample/UI/Examples/Intro/IntroView.swift"><img src="docs/images/pinlayout_intro_example_iphonex.png"/></a>
107+
<a href="https://github.com/layoutBox/PinLayout/blob/master/Example/PinLayoutSample/UI/Examples/Intro/IntroView.swift"><img src="docs/images/pinlayout_intro_example_iphonex.png"/></a>
108108

109109
```swift
110110
override func layoutSubviews() {
@@ -121,7 +121,7 @@ override func layoutSubviews() {
121121
* 4 views, 4 lines
122122
* PinLayout expose the `safeAreaInsets` through [`UIView.pin.safeArea`](#safeAreaInsets), this property support not only iOS 11, but is also backward compatible for earlier iOS releases (7/8/9/10). See [safeAreaInsets support](#safeAreaInsets) for more information.
123123
* PinLayout doesn't use auto layout constraints, it is a framework that manually layout views. For that reason you need to update the layout inside either `UIView.layoutSubviews()` or `UIViewController.viewDidLayoutSubviews()` to handle container size's changes, including device rotation. You'll also need to handle UITraitCollection changes for app's that support multitasking. In the example above PinLayout's commands are inside UIView's `layoutSubviews()` method.
124-
* This example is available in the [Examples App](#examples_app). See example complete [source code](https://github.com/mirego/PinLayout/blob/master/Example/PinLayoutSample/UI/Examples/Intro/IntroView.swift)
124+
* This example is available in the [Examples App](#examples_app). See example complete [source code](https://github.com/layoutBox/PinLayout/blob/master/Example/PinLayoutSample/UI/Examples/Intro/IntroView.swift)
125125

126126
<br/>
127127

@@ -131,7 +131,7 @@ This example shows how easily PinLayout can adjust its layout based on the view'
131131
* If the container's width is smaller than 500 pixels, the label takes the full width and the UISegmentedControl is placed below it.
132132
* If the container's width is greater or equal to 500 pixels, the UISegmentedControl is at the top-right corner and the label takes the remaining horizontal space.
133133

134-
<a href="https://github.com/mirego/PinLayout/blob/master/Example/PinLayoutSample/UI/Examples/AdjustToContainer/Subviews/ChoiceSelectorView.swift"><img src="docs/pinlayout_example_adjust_to_container2.png" width="640"/></a>
134+
<a href="https://github.com/layoutBox/PinLayout/blob/master/Example/PinLayoutSample/UI/Examples/AdjustToContainer/Subviews/ChoiceSelectorView.swift"><img src="docs/pinlayout_example_adjust_to_container2.png" width="640"/></a>
135135

136136

137137
```swift
@@ -146,7 +146,7 @@ This example shows how easily PinLayout can adjust its layout based on the view'
146146
}
147147
```
148148

149-
:pushpin: This example is available in the [Examples App](#examples_app). See example complete [source code](https://github.com/mirego/PinLayout/blob/master/Example/PinLayoutSample/UI/Examples/AdjustToContainer/Subviews/ChoiceSelectorView.swift)
149+
:pushpin: This example is available in the [Examples App](#examples_app). See example complete [source code](https://github.com/layoutBox/PinLayout/blob/master/Example/PinLayoutSample/UI/Examples/AdjustToContainer/Subviews/ChoiceSelectorView.swift)
150150

151151

152152
<a name="introduction"></a>
@@ -1132,7 +1132,7 @@ This example layout 4 subviews inside the safeArea. The UINavigationBar and UITa
11321132

11331133
This example runs perfectly on a iPhone X (iOS 11), but it also runs on any devices with iOS 7, 8, 9 and 10.
11341134

1135-
:pushpin: This example is available in the [Examples App](#examples_app). See example complete [source code](https://github.com/mirego/PinLayout/blob/master/Example/PinLayoutSample/UI/Examples/SafeArea/SafeAreaView.swift)
1135+
:pushpin: This example is available in the [Examples App](#examples_app). See example complete [source code](https://github.com/layoutBox/PinLayout/blob/master/Example/PinLayoutSample/UI/Examples/SafeArea/SafeAreaView.swift)
11361136

11371137

11381138
<br/>
@@ -1181,16 +1181,16 @@ Here is the initial state:
11811181

11821182

11831183
###### Example:
1184-
This example shows how a view (`containerView`) with two subviews (`imageView` and `label`), can be adjusted to the size of its subviews and then centered inside its parent.
1184+
This example shows how a view (`containerView`) that has subviews (`imageView` and `label`) can be adjusted to the size of its subviews and then centered inside its parent.
11851185

1186-
<img src="docs/images/wrapContent_example_1.png" width="540"/>
1186+
<img src="docs/images/wrapContent_example.png" width="540"/>
11871187

11881188
```swift
11891189
label.pin.below(of: imageView, aligned: .center).marginTop(4)
1190-
containerView.pin.wrapContent().center()
1190+
containerView.pin.wrapContent(padding: 10).center()
11911191
```
11921192
* Line 1: Position the label below the imageView aligned on its center with a top margin of 4 pixels.
1193-
* Line 2: Adjust the `containerView`'s size and position its subviews to create a tight wrap around them, and then it center the `containerView` inside its parent (superview).
1193+
* Line 2: Adjust the `containerView`'s size and position its subviews to create a tight wrap around them with a padding of 10 pixels all around. The `containerView` is also centered inside its parent (superview).
11941194

11951195
<br/>
11961196

@@ -1480,7 +1480,7 @@ Then, run `pod install`.
14801480
To integrate PinLayout into your Xcode project using Carthage, specify it in your `Cartfile`:
14811481

14821482
```
1483-
github "mirego/PinLayout"
1483+
github "layoutBox/PinLayout"
14841484
```
14851485

14861486
Then, run `carthage update` to build the framework and drag the built `PinLayout.framework` into your Xcode project.
@@ -1491,7 +1491,7 @@ Once you have your Swift package set up, you only need to add PinLayout as a dep
14911491

14921492
```swift
14931493
dependencies: [
1494-
.Package(url: "https://github.com/mirego/PinLayout.git", majorVersion: 1)
1494+
.Package(url: "https://github.com/layoutBox/PinLayout.git", majorVersion: 1)
14951495
]
14961496
```
14971497

@@ -1515,16 +1515,16 @@ There is an Example app that expose some usage example on PinLayout, including:
15151515
:pushpin: Tap on images to see the example's source code.
15161516

15171517
<p align="center">
1518-
<a href="https://github.com/mirego/PinLayout/blob/master/Example/PinLayoutSample/UI/Examples/Intro/IntroView.swift"><img src="docs/images/pinlayout_intro_example_iphonex.png" width=420/></a>
1519-
<a href="https://github.com/mirego/PinLayout/tree/master/Example/PinLayoutSample/UI/Examples/SafeArea/SafeAreaView.swift"><img src="docs/images/pinlayout_safearea_example_iphonex.png" width=420/></a>
1520-
<a href="https://github.com/mirego/PinLayout/blob/master/Example/PinLayoutSample/UI/Examples/AdjustToContainer/Subviews/ChoiceSelectorView.swift"><img src="docs/pinlayout_example_adjust_to_container-portrait.png" width=120/></a>
1521-
<a href="https://github.com/mirego/PinLayout/blob/master/Example/PinLayoutSample/UI/Examples/TableViewExample/TableViewExampleView.swift"><img src="docs/pinlayout_exampleapp_tableview.png" width=120/></a>
1522-
<a href="https://github.com/mirego/PinLayout/blob/master/Example/PinLayoutSample/UI/Examples/CollectionViewExample/HouseCell.swift"><img src="docs/pinlayout_exampleapp_collectionview.png" width=120/></a>
1523-
<a href="https://github.com/mirego/PinLayout/blob/master/Example/PinLayoutSample/UI/Examples/WrapContent/WrapContentView.swift"><img src="docs/pinlayout_example_wrapContent.png" width=120/></a>
1524-
<a href="https://github.com/mirego/PinLayout/blob/master/Example/PinLayoutSample/UI/Examples/Form/FormView.swift"><img src="docs/pinlayout_example_form.gif" width=120/></a>
1525-
<a href="https://github.com/mirego/PinLayout/blob/master/Example/PinLayoutSample/UI/Examples/AutoAdjustingSize/AutoAdjustingSizeView.swift"><img src="docs/pinlayout_exampleapp_auto_adjusting_size.png" width=120/></a>
1526-
<a href="https://github.com/mirego/PinLayout/blob/master/Example/PinLayoutSample/UI/Examples/RelativeView/RelativeView.swift"><img src="docs/pinlayout_exampleapp_relative_position.png" width=120/> </a>
1527-
<a href="https://github.com/mirego/PinLayout/tree/master/Example/PinLayoutSample/UI/Examples/MultiRelativeView"><img src="docs/pinlayout_exampleapp_multi_relative_position.png" width=120/></a>
1518+
<a href="https://github.com/layoutBox/PinLayout/blob/master/Example/PinLayoutSample/UI/Examples/Intro/IntroView.swift"><img src="docs/images/pinlayout_intro_example_iphonex.png" alt="PinLayout example" width=420/></a>
1519+
<a href="https://github.com/layoutBox/PinLayout/tree/master/Example/PinLayoutSample/UI/Examples/SafeArea/SafeAreaView.swift"><img src="docs/images/pinlayout_safearea_example_iphonex.png" alt="PinLayout example" width=420/></a>
1520+
<a href="https://github.com/layoutBox/PinLayout/blob/master/Example/PinLayoutSample/UI/Examples/AdjustToContainer/Subviews/ChoiceSelectorView.swift"><img src="docs/pinlayout_example_adjust_to_container-portrait.png" alt="PinLayout example" width=120/></a>
1521+
<a href="https://github.com/layoutBox/PinLayout/blob/master/Example/PinLayoutSample/UI/Examples/TableViewExample/TableViewExampleView.swift"><img src="docs/pinlayout_exampleapp_tableview.png" alt="PinLayout example" width=120/></a>
1522+
<a href="https://github.com/layoutBox/PinLayout/blob/master/Example/PinLayoutSample/UI/Examples/CollectionViewExample/HouseCell.swift"><img src="docs/pinlayout_exampleapp_collectionview.png" alt="PinLayout example" width=120/></a>
1523+
<a href="https://github.com/layoutBox/PinLayout/blob/master/Example/PinLayoutSample/UI/Examples/WrapContent/WrapContentView.swift"><img src="docs/pinlayout_example_wrapContent.png" width=120/></a>
1524+
<a href="https://github.com/layoutBox/PinLayout/blob/master/Example/PinLayoutSample/UI/Examples/Form/FormView.swift"><img src="docs/pinlayout_example_form.gif" alt="PinLayout example" width=120/></a>
1525+
<a href="https://github.com/layoutBox/PinLayout/blob/master/Example/PinLayoutSample/UI/Examples/AutoAdjustingSize/AutoAdjustingSizeView.swift"><img src="docs/pinlayout_exampleapp_auto_adjusting_size.png" alt="PinLayout example" width=120/></a>
1526+
<a href="https://github.com/layoutBox/PinLayout/blob/master/Example/PinLayoutSample/UI/Examples/RelativeView/RelativeView.swift"><img src="docs/pinlayout_exampleapp_relative_position.png" alt="PinLayout example" width=120/> </a>
1527+
<a href="https://github.com/layoutBox/PinLayout/tree/master/Example/PinLayoutSample/UI/Examples/MultiRelativeView"><img src="docs/pinlayout_exampleapp_multi_relative_position.png" alt="PinLayout example" width=120/></a>
15281528
</p>
15291529

15301530
This app is available in the `Example` folder. Note that you must do a `pod install` before running the example project.
@@ -1600,9 +1600,9 @@ All example in the [Examples App](#examples_app) handle correctly the `safeAreaI
16001600

16011601
<a name="comments"></a>
16021602
## Questions, comments, ideas, suggestions, issues, ....
1603-
If you have questions, you can checks already [answered questions here.](https://github.com/mirego/PinLayout/issues?q=is%3Aissue+is%3Aclosed+label%3Aquestion)
1603+
If you have questions, you can checks already [answered questions here.](https://github.com/layoutBox/PinLayout/issues?q=is%3Aissue+is%3Aclosed+label%3Aquestion)
16041604

1605-
For any **comments**, **ideas**, **suggestions**, **issues**, simply open an [issue](https://github.com/mirego/PinLayout/issues).
1605+
For any **comments**, **ideas**, **suggestions**, **issues**, simply open an [issue](https://github.com/layoutBox/PinLayout/issues).
16061606

16071607
If you find PinLayout interesting, thanks to **Star** it. You'll be able to retrieve it easily later.
16081608

@@ -1622,7 +1622,7 @@ PinLayout was inspired by other great layout frameworks, including:
16221622
<br>
16231623

16241624
## History
1625-
PinLayout recent history is available in the [CHANGELOG](CHANGELOG.md) also in [GitHub Releases](https://github.com/mirego/PinLayout/releases).
1625+
PinLayout recent history is available in the [CHANGELOG](CHANGELOG.md) also in [GitHub Releases](https://github.com/layoutBox/PinLayout/releases).
16261626

16271627
<br>
16281628

Sources/Impl/PinSafeArea.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ struct PinLayoutSwizzling {
142142
// ReactiveCocoa, Aspect, ..., and PinLayout.
143143
// To fix this issue, simply call `Pin.initPinLayout()` BEFORE initializing "New Relic" with
144144
// NewRelic.start(withApplicationToken:"APP_TOKEN").
145-
// See here for more information regarding this issue https://github.com/mirego/PinLayout/issues/130
145+
// See here for more information regarding this issue https://github.com/layoutBox/PinLayout/issues/130
146146
viewWillLayoutSubviews(calledViewController, selector)
147147
}
148148
PinLayoutSwizzling.pinlayoutViewWillLayoutSubviews(viewController: calledViewController)

TestProjects/carthage/ios/Cartfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github "mirego/PinLayout"
1+
github "layoutBox/PinLayout"

TestProjects/cocoapods/ios/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use_frameworks!
55

66
target 'PinLayout-iOS' do
77
#pod 'PinLayout'
8-
#pod 'PinLayout', :git => 'https://github.com/mirego/PinLayout.git', :commit => 'f29519b08890da144772fe9b082cd6499b5d82c1'
8+
#pod 'PinLayout', :git => 'https://github.com/layoutBox/PinLayout.git', :commit => 'f29519b08890da144772fe9b082cd6499b5d82c1'
99
pod 'PinLayout', :path => '../../..'
1010
end
1111

TestProjects/cocoapods/macos/PinLayout-macOS/TestObjectiveC.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ - (void)layout {
3535
[super layout];
3636

3737
[[[[[logo.pinObjc top] left] width:100] marginWithTop:topLayoutGuide + 10 horizontal:10 bottom:10] layout];
38-
[[[[separatorView.pinObjc belowOfViews:logo aligned:HorizontalAlignLeft] height:1] marginTop:10] layout];
38+
[[[[separatorView.pinObjc belowOf:logo aligned:HorizontalAlignLeft] height:1] marginTop:10] layout];
3939
}
4040

4141
@end

TestProjects/cocoapods/macos/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use_frameworks!
55

66
target 'PinLayout-macOS' do
77
#pod 'PinLayout'
8-
#pod 'PinLayout', :git => 'https://github.com/mirego/PinLayout.git', :commit => 'f29519b08890da144772fe9b082cd6499b5d82c1'
8+
#pod 'PinLayout', :git => 'https://github.com/layoutBox/PinLayout.git', :commit => 'f29519b08890da144772fe9b082cd6499b5d82c1'
99
pod 'PinLayout', :path => '../../..'
1010
end
1111

TestProjects/cocoapods/tvos/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ platform :tvos, '10.3'
33

44
target 'PinLayout-tvOS' do
55
#pod 'PinLayout'
6-
#pod 'PinLayout', :git => 'https://github.com/mirego/PinLayout.git', :commit => 'f29519b08890da144772fe9b082cd6499b5d82c1'
6+
#pod 'PinLayout', :git => 'https://github.com/layoutBox/PinLayout.git', :commit => 'f29519b08890da144772fe9b082cd6499b5d82c1'
77
pod 'PinLayout', :path => '../../..'
88
end
99

docs/Benchmark.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The benchmark includes the following layout frameworks:
2121
* [FlexLayout](https://github.com/layoutBox/FlexLayout)
2222
* [LayoutKit](https://github.com/linkedin/LayoutKit)
2323
* Manual layout (i.e. set UIView's frame directly)
24-
* [PinLayout](https://github.com/mirego/PinLayout)
24+
* [PinLayout](https://github.com/layoutBox/PinLayout)
2525
* UIStackViews
2626

2727

0 commit comments

Comments
 (0)