Skip to content

Commit f1de5a0

Browse files
authored
Merge pull request #230 from layoutBox/update
Update project to 1.10.0
2 parents c33d7ab + c6c3e76 commit f1de5a0

File tree

26 files changed

+746
-30
lines changed

26 files changed

+746
-30
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,4 @@ TestProjects/cocoapods/tvos/PinLayout-tvOS.xcworkspace/
1515
TestProjects/carthage/ios/Cartfile.resolved
1616
TestProjects/carthage/ios/Carthage/
1717

18-
TestProjects/swift-package-manager
19-
2018
Example/PinLayoutExampleMacOS

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,22 @@
77

88
# Change Log
99

10+
## [1.10.0](https://github.com/layoutBox/PinLayout/releases/tag/1.10.0)
11+
Released on 2021-05-18
12+
13+
#### New Objective-C interface
14+
Instead of using verbose Objective-C with all brackets (`[ ]`):
15+
```
16+
[[[[[[logo.pinObjc top] left] width:100] aspectRatio] marginWithTop:topLayoutGuide + 10 horizontal:10 bottom:10] layout];
17+
```
18+
19+
It now use a function chaining:
20+
```
21+
logo.pinObjc.topInsets(safeArea).leftInsets(safeArea).width(100).aspectRatio().margin(margin).layout();
22+
```
23+
24+
Added by [protosse](https://github.com/protosse) in Pull Request [#229](https://github.com/layoutBox/PinLayout/pull/229)
25+
1026
## [1.9.4](https://github.com/layoutBox/PinLayout/releases/tag/1.9.4)
1127
Released on 2021-05-17
1228

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.0
1+
// swift-tools-version:5.4
22

33
import PackageDescription
44

PinLayout.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88

99
Pod::Spec.new do |spec|
1010
spec.name = "PinLayout"
11-
spec.version = "1.9.4"
11+
spec.version = "1.10.0"
1212
spec.summary = "Fast Swift Views layouting without auto layout. No magic, pure code, full control and blazing fast."
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/CALayer]"
1414
spec.homepage = "https://github.com/layoutBox/PinLayout"
1515
spec.license = "MIT license"
1616
spec.author = { "Luc Dion" => "luc_dion@yahoo.com" }
1717
spec.source = { :git => "https://github.com/layoutBox/PinLayout.git", :tag => "#{spec.version}" }
1818
spec.source_files = "Sources/**/*.swift"
19-
spec.swift_versions = ['4.2', '5.0', '5.1', '5.2', '5.3']
19+
spec.swift_versions = ['4.2', '5.0', '5.1', '5.2', '5.3', '5.4']
2020

2121
spec.ios.deployment_target = '9.0'
2222
spec.ios.frameworks = 'Foundation', 'CoreGraphics', 'UIKit'

Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PODS:
22
- Nimble (9.2.0)
3-
- PinLayout (1.9.3)
3+
- PinLayout (1.9.4)
44
- Quick (4.0.0)
55
- SwiftLint (0.43.1)
66

@@ -22,7 +22,7 @@ EXTERNAL SOURCES:
2222

2323
SPEC CHECKSUMS:
2424
Nimble: 4f4a345c80b503b3ea13606a4f98405974ee4d0b
25-
PinLayout: 45d8413afa778da892f6c2d4f898fb8de88c8e29
25+
PinLayout: 0d73cf5bea456b8112429c984de377839b9ec34c
2626
Quick: 6473349e43b9271a8d43839d9ba1c442ed1b7ac4
2727
SwiftLint: 99f82d07b837b942dd563c668de129a03fc3fb52
2828

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ Extremely Fast views layouting without auto layout. No magic, pure code, full co
3535
### Requirements
3636
* iOS 9.0+ / tvOS 9.0+ / macOS 10.9+
3737
* Swift 5.x / 4 / 3 / Objective-C
38-
* Xcode 12 / 11 / 10 / 9
38+
* Xcode 12 / 11 / 10
3939

4040
### Recent changes/features
41+
* :star: New chainable Objective-C syntax. See [PinLayout using Objective-C](#objective_c_interface)
4142
* :star: Automatic Sizing, use PinLayout to compute view size. See [Automatic sizing](#automatic_sizing)
4243
* :star: Add methods to position a view between two other views. See [Layout between other views](#layout_between).
4344
* :star: Add [`pin.readableMargins` and `pin.layoutMargins`](#safeAreaInsets) properties.
@@ -1781,6 +1782,11 @@ To integrate PinLayout into your Xcode project using CocoaPods, specify it in yo
17811782

17821783
Then, run `pod install`.
17831784

1785+
### Swift Package Manager (SPM)
1786+
1787+
1. From Xcode, select from the menu **File > Swift Packages > Add Package Dependency**
1788+
2. Specify the URL `https://github.com/layoutBox/PinLayout`
1789+
17841790
### Carthage
17851791

17861792
To integrate PinLayout into your Xcode project using Carthage, specify it in your `Cartfile`:

TestProjects/carthage/ios/Cartfile

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

TestProjects/carthage/ios/PinLayout-Carthage-iOS/TestObjectiveC.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ - (id)initWithFrame:(CGRect)frame {
4545
- (void) layoutSubviews {
4646
[super layoutSubviews];
4747

48-
// logo.pinObjc.top().left().width(100).aspectRatio().marginTHB(topLayoutGuide + 10, 10, 10).layout();
49-
// segmented.pinObjc.rightOfAligned(logo, VerticalAlignTop).right().marginHorizontal(10).layout();
50-
// textLabel.pinObjc.belowOfAligned(segmented, HorizontalAlignLeft).widthOf(segmented).pinEdges().marginTop(10).sizeToFitType(FitWidth).layout();
51-
// separatorView.pinObjc.belowOfViewsAligned(@[logo, textLabel], HorizontalAlignLeft).rightToEdge(segmented.edge.right).height(1).marginTop(10).layout();
48+
logo.pinObjc.top().left().width(100).aspectRatio().marginTHB(topLayoutGuide + 10, 10, 10).layout();
49+
segmented.pinObjc.rightOfAligned(logo, VerticalAlignTop).right().marginHorizontal(10).layout();
50+
textLabel.pinObjc.belowOfAligned(segmented, HorizontalAlignLeft).widthOf(segmented).pinEdges().marginTop(10).sizeToFitType(FitWidth).layout();
51+
separatorView.pinObjc.belowOfViewsAligned(@[logo, textLabel], HorizontalAlignLeft).rightToEdge(segmented.edge.right).height(1).marginTop(10).layout();
5252
}
5353

5454
@end
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>logFormatVersion</key>
6+
<integer>10</integer>
7+
<key>logs</key>
8+
<dict/>
9+
</dict>
10+
</plist>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>logFormatVersion</key>
6+
<integer>10</integer>
7+
<key>logs</key>
8+
<dict/>
9+
</dict>
10+
</plist>

0 commit comments

Comments
 (0)