diff --git a/CHANGELOG.md b/CHANGELOG.md index 00135c6..b52eaf5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,22 @@ # Change Log +## [1.10.0](https://github.com/layoutBox/PinLayout/releases/tag/1.10.0) +Released on 2021-05-18 + +#### New Objective-C interface +Instead of using verbose Objective-C with all brackets (`[ ]`): +``` +[[[[[[logo.pinObjc top] left] width:100] aspectRatio] marginWithTop:topLayoutGuide + 10 horizontal:10 bottom:10] layout]; +``` + +It now use a function chaining: +``` +logo.pinObjc.topInsets(safeArea).leftInsets(safeArea).width(100).aspectRatio().margin(margin).layout(); +``` + +Added by [protosse](https://github.com/protosse) in Pull Request [#229](https://github.com/layoutBox/PinLayout/pull/229) + ## [1.9.4](https://github.com/layoutBox/PinLayout/releases/tag/1.9.4) Released on 2021-05-17 diff --git a/PinLayout.podspec b/PinLayout.podspec index f321832..e8128ab 100644 --- a/PinLayout.podspec +++ b/PinLayout.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |spec| spec.name = "PinLayout" - spec.version = "1.9.4" + spec.version = "1.10.0" spec.summary = "Fast Swift Views layouting without auto layout. No magic, pure code, full control and blazing fast." 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]" spec.homepage = "https://github.com/layoutBox/PinLayout" @@ -16,7 +16,7 @@ Pod::Spec.new do |spec| spec.author = { "Luc Dion" => "luc_dion@yahoo.com" } spec.source = { :git => "https://github.com/layoutBox/PinLayout.git", :tag => "#{spec.version}" } spec.source_files = "Sources/**/*.swift" - spec.swift_versions = ['4.2', '5.0', '5.1', '5.2', '5.3'] + spec.swift_versions = ['4.2', '5.0', '5.1', '5.2', '5.3', '5.4'] spec.ios.deployment_target = '9.0' spec.ios.frameworks = 'Foundation', 'CoreGraphics', 'UIKit' diff --git a/Podfile.lock b/Podfile.lock index faf5e2f..77ca6e8 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,6 +1,6 @@ PODS: - Nimble (9.2.0) - - PinLayout (1.9.3) + - PinLayout (1.9.4) - Quick (4.0.0) - SwiftLint (0.43.1) @@ -22,7 +22,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Nimble: 4f4a345c80b503b3ea13606a4f98405974ee4d0b - PinLayout: 45d8413afa778da892f6c2d4f898fb8de88c8e29 + PinLayout: 0d73cf5bea456b8112429c984de377839b9ec34c Quick: 6473349e43b9271a8d43839d9ba1c442ed1b7ac4 SwiftLint: 99f82d07b837b942dd563c668de129a03fc3fb52 diff --git a/TestProjects/carthage/ios/Cartfile b/TestProjects/carthage/ios/Cartfile index 62fe144..06800e2 100644 --- a/TestProjects/carthage/ios/Cartfile +++ b/TestProjects/carthage/ios/Cartfile @@ -1 +1 @@ -github "layoutBox/PinLayout" +git "file:////Users/lucdion/dev_luc/PinLayout" diff --git a/TestProjects/carthage/ios/PinLayout-Carthage-iOS/TestObjectiveC.m b/TestProjects/carthage/ios/PinLayout-Carthage-iOS/TestObjectiveC.m index 912ab31..6d612a7 100644 --- a/TestProjects/carthage/ios/PinLayout-Carthage-iOS/TestObjectiveC.m +++ b/TestProjects/carthage/ios/PinLayout-Carthage-iOS/TestObjectiveC.m @@ -45,10 +45,10 @@ - (id)initWithFrame:(CGRect)frame { - (void) layoutSubviews { [super layoutSubviews]; -// logo.pinObjc.top().left().width(100).aspectRatio().marginTHB(topLayoutGuide + 10, 10, 10).layout(); -// segmented.pinObjc.rightOfAligned(logo, VerticalAlignTop).right().marginHorizontal(10).layout(); -// textLabel.pinObjc.belowOfAligned(segmented, HorizontalAlignLeft).widthOf(segmented).pinEdges().marginTop(10).sizeToFitType(FitWidth).layout(); -// separatorView.pinObjc.belowOfViewsAligned(@[logo, textLabel], HorizontalAlignLeft).rightToEdge(segmented.edge.right).height(1).marginTop(10).layout(); + logo.pinObjc.top().left().width(100).aspectRatio().marginTHB(topLayoutGuide + 10, 10, 10).layout(); + segmented.pinObjc.rightOfAligned(logo, VerticalAlignTop).right().marginHorizontal(10).layout(); + textLabel.pinObjc.belowOfAligned(segmented, HorizontalAlignLeft).widthOf(segmented).pinEdges().marginTop(10).sizeToFitType(FitWidth).layout(); + separatorView.pinObjc.belowOfViewsAligned(@[logo, textLabel], HorizontalAlignLeft).rightToEdge(segmented.edge.right).height(1).marginTop(10).layout(); } @end