From 97d2aaa1aff08a045cf25e38c55d6b48ae97826c Mon Sep 17 00:00:00 2001 From: Osein Date: Thu, 27 Aug 2020 21:55:29 +0300 Subject: [PATCH 1/7] Add versions of `fill` where the `inset` param is `UIEdgeInsets` --- Sources/WWLayout/Layout+Fill.swift | 96 +++++++++++++++++++++++++++++ Tests/WWLayoutTests/FillTests.swift | 11 ++++ 2 files changed, 107 insertions(+) diff --git a/Sources/WWLayout/Layout+Fill.swift b/Sources/WWLayout/Layout+Fill.swift index 7c29880..93202ee 100644 --- a/Sources/WWLayout/Layout+Fill.swift +++ b/Sources/WWLayout/Layout+Fill.swift @@ -66,6 +66,18 @@ extension Layout { active: Bool? = nil) -> Layout { return fill(other, axis: axis, inset: Insets(inset), priority: priority, tag: tag, active: active) } + + /// Set the view so it fills another view. + /// Will constrain the edges (left, top, bottom, right) of the target view to the edges of `otherView`, based on the `axis` parameter. + @discardableResult + public func fill(_ other: Anchorable, + axis: LayoutAxis = .xy, + inset: UIEdgeInsets, + priority: LayoutPriority? = nil, + tag: Int? = nil, + active: Bool? = nil) -> Layout { + return fill(other, axis: axis, inset: Insets(inset), priority: priority, tag: tag, active: active) + } /// Set the view so it fills special anchors. /// Will constrain the edges (left, top, bottom, right) of the target view to the edges of `special`, based on the `axis` parameter. @@ -90,6 +102,18 @@ extension Layout { active: Bool? = nil) -> Layout { return fill(special, axis: axis, inset: Insets(inset), priority: priority, tag: tag, active: active) } + + /// Set the view so it fills another view. + /// Will constrain the edges (left, top, bottom, right) of the target view to the edges of `otherView`, based on the `axis` parameter. + @discardableResult + public func fill(_ special: SpecialAnchorable, + axis: LayoutAxis = .xy, + inset: UIEdgeInsets, + priority: LayoutPriority? = nil, + tag: Int? = nil, + active: Bool? = nil) -> Layout { + return fill(special, axis: axis, inset: Insets(inset), priority: priority, tag: tag, active: active) + } // MARK: - Fill except one edge @@ -129,6 +153,18 @@ extension Layout { active: Bool? = nil) -> Layout { return fill(other, except: except, inset: Insets(inset), priority: priority, tag: tag, active: active) } + + /// Set the view so it fills another view - excluding one edge. + /// Will constrain the edges (left, top, bottom, right) of the target view to the edges of `otherView`, based on the `axis` parameter. + @discardableResult + public func fill(_ other: Anchorable, + except: LayoutFillEdge, + inset: UIEdgeInsets, + priority: LayoutPriority? = nil, + tag: Int? = nil, + active: Bool? = nil) -> Layout { + return fill(other, except: except, inset: Insets(inset), priority: priority, tag: tag, active: active) + } /// Set the view so it fills special anchors - excluding one edge. /// Will constrain the edges (left, top, bottom, right) of the target view to the edges of `special`, based on the `axis` parameter. @@ -153,6 +189,18 @@ extension Layout { active: Bool? = nil) -> Layout { return fill(special, except: except, inset: Insets(inset), priority: priority, tag: tag, active: active) } + + /// Set the view so it fills another view - excluding one edge. + /// Will constrain the edges (left, top, bottom, right) of the target view to the edges of `otherView`, based on the `axis` parameter. + @discardableResult + public func fill(_ special: SpecialAnchorable, + except: LayoutFillEdge, + inset: UIEdgeInsets, + priority: LayoutPriority? = nil, + tag: Int? = nil, + active: Bool? = nil) -> Layout { + return fill(special, except: except, inset: Insets(inset), priority: priority, tag: tag, active: active) + } // MARK: - Fill width with maximum @@ -199,6 +247,22 @@ extension Layout { return fillWidth(of: other, inset: Insets(inset), maximum: maximum, alignTo: edge, priority: priority, tag: tag, active: active) } + /// Set the view so it fills the width of another view, with a maximum allowed width. + /// Will constrain: + /// the left & right edges of the target view to the edges of `other` at `priority` - 1; + /// the width to be <= `maximum` + /// the `alignTo` edge to the same ot `other`. + @discardableResult + public func fillWidth(of other: Anchorable, + inset: UIEdgeInsets, + maximum: CGFloat, + alignTo edge: LayoutXEdge = .center, + priority: LayoutPriority? = nil, + tag: Int? = nil, + active: Bool? = nil) -> Layout { + return fillWidth(of: other, inset: Insets(inset), maximum: maximum, alignTo: edge, priority: priority, tag: tag, active: active) + } + /// Set the view so it fills the width of another view, with a maximum allowed width. /// Will constrain: /// the left & right edges of the target view to the edges of `special` at `priority` - 1; @@ -214,5 +278,37 @@ extension Layout { active: Bool? = nil) -> Layout { return fillWidth(of: special.anchorable(with: view), inset: inset, maximum: maximum, alignTo: edge, priority: priority, tag: tag, active: active) } + + /// Set the view so it fills the width of another view, with a maximum allowed width. + /// Will constrain: + /// the left & right edges of the target view to the edges of `special` at `priority` - 1; + /// the width to be <= `maximum` + /// the `alignTo` edge to the same of `special`. + @discardableResult + public func fillWidth(of special: SpecialAnchorable, + inset: CGFloat, + maximum: CGFloat, + alignTo edge: LayoutXEdge = .center, + priority: LayoutPriority? = nil, + tag: Int? = nil, + active: Bool? = nil) -> Layout { + return fillWidth(of: special.anchorable(with: view), inset: Insets(inset), maximum: maximum, alignTo: edge, priority: priority, tag: tag, active: active) + } + + /// Set the view so it fills the width of another view, with a maximum allowed width. + /// Will constrain: + /// the left & right edges of the target view to the edges of `special` at `priority` - 1; + /// the width to be <= `maximum` + /// the `alignTo` edge to the same of `special`. + @discardableResult + public func fillWidth(of special: SpecialAnchorable, + inset: UIEdgeInsets, + maximum: CGFloat, + alignTo edge: LayoutXEdge = .center, + priority: LayoutPriority? = nil, + tag: Int? = nil, + active: Bool? = nil) -> Layout { + return fillWidth(of: special.anchorable(with: view), inset: Insets(inset), maximum: maximum, alignTo: edge, priority: priority, tag: tag, active: active) + } } diff --git a/Tests/WWLayoutTests/FillTests.swift b/Tests/WWLayoutTests/FillTests.swift index 9da384b..ade392a 100644 --- a/Tests/WWLayoutTests/FillTests.swift +++ b/Tests/WWLayoutTests/FillTests.swift @@ -96,6 +96,17 @@ class FillTests: XCTestCase { XCTAssertEqual(child.frame.origin.x, 20) assertConstraints(constraints, priority: .required, active: true) } + + func test_fillWidth_uiEdgeInsets() { + // when + let constraints = child.layout.fillWidth(of: .superview, inset: UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20), maximum: 400).constraints() + container.layoutIfNeeded() + + // then + XCTAssertEqual(child.frame.size.width, 360) + XCTAssertEqual(child.frame.origin.x, 20) + assertConstraints(constraints, priority: .required, active: true) + } func test_fillWidth_insetsIgnored() { // when From ddee32405e27b881821631914c9c81c69fbcb576 Mon Sep 17 00:00:00 2001 From: Osein Date: Thu, 27 Aug 2020 22:09:06 +0300 Subject: [PATCH 2/7] added documentation entries for filling with UIEdgeInsets --- docs/method-reference.md | 1 + docs/middle-out-parameters.md | 3 +++ 2 files changed, 4 insertions(+) diff --git a/docs/method-reference.md b/docs/method-reference.md index 0e636f6..9ec8925 100644 --- a/docs/method-reference.md +++ b/docs/method-reference.md @@ -73,6 +73,7 @@ You can also constrain from a view's center using the `.centerX(to:)` and `.cent ```swift oneView.layout.fillWidth(anotherView, maximum: 400) oneView.layout.fillWidth(anotherView, inset: 20, maximum: 400) + oneView.layout.fillWidth(anotherView, inset: UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20), maximum: 400) oneView.layout.fillWidth(anotherView, inset: 20, maximum: 400, alignTo: .leading) ``` diff --git a/docs/middle-out-parameters.md b/docs/middle-out-parameters.md index 3170aa1..6012adf 100644 --- a/docs/middle-out-parameters.md +++ b/docs/middle-out-parameters.md @@ -48,6 +48,9 @@ The `inset` parameter can either be a single constant, a pair of width, height c // each edge explicitly specified .fill(.superview, inset: Insets(left: 10, top: 5, right: 20, bottom: 0)) + + // each edge explicitly specified with UIEdgeInsets + fill(.superview, inset: UIEdgeInsets(top: 5, left: 10, bottom: 0, right: 20)) ``` ### `edge` From 10ede101d5d0f97e484efb0fdca32e5c7c6c585e Mon Sep 17 00:00:00 2001 From: Steven Grosmark Date: Sat, 6 Feb 2021 14:30:35 -0500 Subject: [PATCH 3/7] Update swiftlint config --- .swiftlint.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.swiftlint.yml b/.swiftlint.yml index 62709d0..62a9d33 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -4,15 +4,15 @@ # Find all the available rules by running: # swiftlint rules -# rules to exclude from running -disabled_rules: +disabled_rules: # rule identifiers to exclude from running - identifier_name + - line_length - no_extension_access_modifier - - statement_position # a.k.a. cuddled else + - statement_position - shorthand_operator + - multiple_closures_with_trailing_closure -# rules that must run -opt_in_rules: +opt_in_rules: # some rules are only opt-in - anyobject_protocol - collection_alignment - closure_spacing @@ -34,6 +34,7 @@ opt_in_rules: - empty_string - empty_xctest_method - explicit_init + - first_where - force_cast - force_try - force_unwrapping @@ -47,6 +48,7 @@ opt_in_rules: - multiline_parameters - no_space_in_method_call - opening_brace + - operator_usage_whitespace - overridden_super_call - prohibited_super_call - redundant_discardable_let @@ -70,10 +72,6 @@ custom_rules: name: "No space after opening parentheses" message: "Please avoid using space after opening parentheses" regex: '\(\h+' - no_space_before_closing_parentheses: - name: "No space before closing parentheses" - message: "Please avoid using space before closing parentheses" - regex: '\h+\)' anonymous_init: name: "Anonymous init()" @@ -105,8 +103,6 @@ function_parameter_count: warning: 6 error: 9 -line_length: 160 - nesting: type_level: warning: 3 # default is 1 @@ -116,18 +112,22 @@ trailing_whitespace: type_body_length: warning: 500 # default is 200 - error: 600 # default is 350 + error: 1000 # default is 350 unused_setter_value: error + #--- #--- Paths #included: # paths to include during linting. `--path` is ignored if present. # - ../Pod +# In ios-common-config, the path to the sources will be done via the --path argument -# excluded: # paths to ignore during linting. Takes precedence over `included`. -# - ./vendor -# - ./fastlane +excluded: # paths to ignore during linting. Takes precedence over `included`. + - ./Example/Pods + - ./Pods + - ./vendor + - ./fastlane reporter: "xcode" # reporter type (xcode, json, csv, checkstyle, junit, html, emoji) From 7fe08c1c311751b855b0d9ecc716a83fc96a15ea Mon Sep 17 00:00:00 2001 From: Steven Grosmark Date: Sat, 6 Feb 2021 14:43:43 -0500 Subject: [PATCH 4/7] Update file header comments --- Sources/WWLayout/Anchorable.swift | 6 ++-- Sources/WWLayout/Insets.swift | 6 ++-- Sources/WWLayout/Layout+Activate.swift | 6 ++-- Sources/WWLayout/Layout+Center.swift | 6 ++-- Sources/WWLayout/Layout+Edges.swift | 6 ++-- Sources/WWLayout/Layout+Fill.swift | 6 ++-- Sources/WWLayout/Layout+Size.swift | 6 ++-- Sources/WWLayout/Layout.swift | 6 ++-- Sources/WWLayout/LayoutAnchor.swift | 6 ++-- Sources/WWLayout/LayoutAxis.swift | 6 ++-- Sources/WWLayout/LayoutConstraint.swift | 6 ++-- Sources/WWLayout/LayoutDimension.swift | 6 ++-- Sources/WWLayout/LayoutEdge.swift | 6 ++-- Sources/WWLayout/LayoutPriority.swift | 6 ++-- Sources/WWLayout/LayoutRelation.swift | 6 ++-- Sources/WWLayout/LayoutView.swift | 6 ++-- Sources/WWLayout/SizeClass.swift | 6 ++-- .../WWLayout/UITraitCollection+Active.swift | 6 ++-- Sources/WWLayout/UIView+Containment.swift | 6 ++-- Sources/WWLayout/UIView+Layout.swift | 6 ++-- Sources/WWLayout/WWLayout.h | 6 ++-- .../BasicViewToSuperviewTests.swift | 6 ++-- .../WWLayoutTests/ConstraintArrayTests.swift | 6 ++-- Tests/WWLayoutTests/FillTests.swift | 6 ++-- Tests/WWLayoutTests/InsetTests.swift | 6 ++-- Tests/WWLayoutTests/PriorityTests.swift | 6 ++-- Tests/WWLayoutTests/SafeAreaTests.swift | 6 ++-- Tests/WWLayoutTests/SiblingTests.swift | 6 ++-- Tests/WWLayoutTests/SizeClassTests.swift | 6 ++-- Tests/WWLayoutTests/StackingTests.swift | 6 ++-- Tests/WWLayoutTests/SwiftCompatibility.swift | 6 ++-- WWLayout.xcodeproj/project.pbxproj | 2 +- .../xcshareddata/IDETemplateMacros.plist | 4 +-- .../xcshareddata/IDETemplateMacros.plist | 4 +-- .../WWLayoutExample/AppDelegate.swift | 6 ++-- .../SampleListViewController.swift | 6 ++-- .../WWLayoutExample/Samples/Baselines.swift | 6 ++-- .../WWLayoutExample/Samples/BasicSample.swift | 6 ++-- .../WWLayoutExample/Samples/CenterEdges.swift | 6 ++-- .../Samples/FillWidthSample.swift | 6 ++-- .../Samples/LayoutMarginsSample.swift | 6 ++-- .../Samples/SafeAreaSample.swift | 6 ++-- .../Samples/SampleViewController.swift | 6 ++-- .../Samples/SizeClassSample.swift | 6 ++-- .../Samples/TaggingSample.swift | 6 ++-- .../WWLayoutExample/Samples/ThreeEdges.swift | 6 ++-- .../xcshareddata/IDETemplateMacros.plist | 36 +++++++++++++++++++ .../WWLayoutTV/WWLayoutTV/AppDelegate.swift | 23 ++++++++++++ .../WWLayoutTV/ViewController.swift | 23 ++++++++++++ .../WWLayoutTVTests/WWLayoutTVTests.swift | 23 ++++++++++++ 50 files changed, 239 insertions(+), 134 deletions(-) create mode 100644 WWLayoutExample/WWLayoutTV/WWLayoutTV.xcodeproj/xcshareddata/IDETemplateMacros.plist diff --git a/Sources/WWLayout/Anchorable.swift b/Sources/WWLayout/Anchorable.swift index 9aaab0b..66f6c03 100644 --- a/Sources/WWLayout/Anchorable.swift +++ b/Sources/WWLayout/Anchorable.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // Anchorable.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import UIKit diff --git a/Sources/WWLayout/Insets.swift b/Sources/WWLayout/Insets.swift index f74755d..a2b9c60 100644 --- a/Sources/WWLayout/Insets.swift +++ b/Sources/WWLayout/Insets.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // Insets.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import UIKit diff --git a/Sources/WWLayout/Layout+Activate.swift b/Sources/WWLayout/Layout+Activate.swift index 97db8e9..c9be065 100644 --- a/Sources/WWLayout/Layout+Activate.swift +++ b/Sources/WWLayout/Layout+Activate.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // Layout+Activate.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import UIKit diff --git a/Sources/WWLayout/Layout+Center.swift b/Sources/WWLayout/Layout+Center.swift index eaebb66..2139d19 100644 --- a/Sources/WWLayout/Layout+Center.swift +++ b/Sources/WWLayout/Layout+Center.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // Layout+Center.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import UIKit diff --git a/Sources/WWLayout/Layout+Edges.swift b/Sources/WWLayout/Layout+Edges.swift index ed71620..301d670 100644 --- a/Sources/WWLayout/Layout+Edges.swift +++ b/Sources/WWLayout/Layout+Edges.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // Layout+Edges.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import UIKit diff --git a/Sources/WWLayout/Layout+Fill.swift b/Sources/WWLayout/Layout+Fill.swift index 93202ee..3489bdd 100644 --- a/Sources/WWLayout/Layout+Fill.swift +++ b/Sources/WWLayout/Layout+Fill.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // Layout+Fill.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import UIKit diff --git a/Sources/WWLayout/Layout+Size.swift b/Sources/WWLayout/Layout+Size.swift index 6c74d72..b9d274b 100644 --- a/Sources/WWLayout/Layout+Size.swift +++ b/Sources/WWLayout/Layout+Size.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // Layout+Size.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import UIKit diff --git a/Sources/WWLayout/Layout.swift b/Sources/WWLayout/Layout.swift index 0f26352..6b59695 100644 --- a/Sources/WWLayout/Layout.swift +++ b/Sources/WWLayout/Layout.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // Layout.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import UIKit diff --git a/Sources/WWLayout/LayoutAnchor.swift b/Sources/WWLayout/LayoutAnchor.swift index d97d6be..e9f44f3 100644 --- a/Sources/WWLayout/LayoutAnchor.swift +++ b/Sources/WWLayout/LayoutAnchor.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // LayoutAnchor.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import UIKit diff --git a/Sources/WWLayout/LayoutAxis.swift b/Sources/WWLayout/LayoutAxis.swift index 4bc22f1..d5db903 100644 --- a/Sources/WWLayout/LayoutAxis.swift +++ b/Sources/WWLayout/LayoutAxis.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // LayoutAxis.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import UIKit diff --git a/Sources/WWLayout/LayoutConstraint.swift b/Sources/WWLayout/LayoutConstraint.swift index c47b551..2b08b18 100644 --- a/Sources/WWLayout/LayoutConstraint.swift +++ b/Sources/WWLayout/LayoutConstraint.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // LayoutConstraint.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import UIKit diff --git a/Sources/WWLayout/LayoutDimension.swift b/Sources/WWLayout/LayoutDimension.swift index 2c1ac88..5011f96 100644 --- a/Sources/WWLayout/LayoutDimension.swift +++ b/Sources/WWLayout/LayoutDimension.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // LayoutDimension.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import UIKit diff --git a/Sources/WWLayout/LayoutEdge.swift b/Sources/WWLayout/LayoutEdge.swift index d217a66..c273673 100644 --- a/Sources/WWLayout/LayoutEdge.swift +++ b/Sources/WWLayout/LayoutEdge.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // LayoutEdge.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import UIKit diff --git a/Sources/WWLayout/LayoutPriority.swift b/Sources/WWLayout/LayoutPriority.swift index 045f06c..ec1247f 100644 --- a/Sources/WWLayout/LayoutPriority.swift +++ b/Sources/WWLayout/LayoutPriority.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // LayoutPriority.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import UIKit diff --git a/Sources/WWLayout/LayoutRelation.swift b/Sources/WWLayout/LayoutRelation.swift index 8d5ab00..71411c8 100644 --- a/Sources/WWLayout/LayoutRelation.swift +++ b/Sources/WWLayout/LayoutRelation.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // LayoutRelation.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import UIKit diff --git a/Sources/WWLayout/LayoutView.swift b/Sources/WWLayout/LayoutView.swift index 59f2385..2449cba 100644 --- a/Sources/WWLayout/LayoutView.swift +++ b/Sources/WWLayout/LayoutView.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // LayoutView.swift // WWLayout @@ -12,7 +12,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import UIKit diff --git a/Sources/WWLayout/SizeClass.swift b/Sources/WWLayout/SizeClass.swift index 73e111a..b1c2563 100644 --- a/Sources/WWLayout/SizeClass.swift +++ b/Sources/WWLayout/SizeClass.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // SizeClass.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2019 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import UIKit diff --git a/Sources/WWLayout/UITraitCollection+Active.swift b/Sources/WWLayout/UITraitCollection+Active.swift index 4264d97..ce928ff 100644 --- a/Sources/WWLayout/UITraitCollection+Active.swift +++ b/Sources/WWLayout/UITraitCollection+Active.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // UITraitCollection+Active.swift // WWLayout @@ -12,7 +12,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import UIKit diff --git a/Sources/WWLayout/UIView+Containment.swift b/Sources/WWLayout/UIView+Containment.swift index 858ccc3..0fc3775 100644 --- a/Sources/WWLayout/UIView+Containment.swift +++ b/Sources/WWLayout/UIView+Containment.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // UIView+Containment.swift // WWLayout @@ -12,7 +12,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import UIKit diff --git a/Sources/WWLayout/UIView+Layout.swift b/Sources/WWLayout/UIView+Layout.swift index 3cd79ec..8375f3b 100644 --- a/Sources/WWLayout/UIView+Layout.swift +++ b/Sources/WWLayout/UIView+Layout.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // UIView+Layout.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import UIKit diff --git a/Sources/WWLayout/WWLayout.h b/Sources/WWLayout/WWLayout.h index 257f3b3..7a8cefb 100644 --- a/Sources/WWLayout/WWLayout.h +++ b/Sources/WWLayout/WWLayout.h @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // WWLayout.h // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // #import diff --git a/Tests/WWLayoutTests/BasicViewToSuperviewTests.swift b/Tests/WWLayoutTests/BasicViewToSuperviewTests.swift index a327dfe..82e4d80 100644 --- a/Tests/WWLayoutTests/BasicViewToSuperviewTests.swift +++ b/Tests/WWLayoutTests/BasicViewToSuperviewTests.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // BasicViewToSuperviewTests.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import XCTest diff --git a/Tests/WWLayoutTests/ConstraintArrayTests.swift b/Tests/WWLayoutTests/ConstraintArrayTests.swift index 201003f..0d1e1e7 100644 --- a/Tests/WWLayoutTests/ConstraintArrayTests.swift +++ b/Tests/WWLayoutTests/ConstraintArrayTests.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // ConstraintArrayTests.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import XCTest diff --git a/Tests/WWLayoutTests/FillTests.swift b/Tests/WWLayoutTests/FillTests.swift index ade392a..4f1b209 100644 --- a/Tests/WWLayoutTests/FillTests.swift +++ b/Tests/WWLayoutTests/FillTests.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // FillTests.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2019 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import XCTest diff --git a/Tests/WWLayoutTests/InsetTests.swift b/Tests/WWLayoutTests/InsetTests.swift index 08d6133..948c7fb 100644 --- a/Tests/WWLayoutTests/InsetTests.swift +++ b/Tests/WWLayoutTests/InsetTests.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // InsetTests.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import XCTest diff --git a/Tests/WWLayoutTests/PriorityTests.swift b/Tests/WWLayoutTests/PriorityTests.swift index 400e864..dc9748a 100644 --- a/Tests/WWLayoutTests/PriorityTests.swift +++ b/Tests/WWLayoutTests/PriorityTests.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // PriorityTests.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import XCTest diff --git a/Tests/WWLayoutTests/SafeAreaTests.swift b/Tests/WWLayoutTests/SafeAreaTests.swift index 4249ddc..460c37c 100644 --- a/Tests/WWLayoutTests/SafeAreaTests.swift +++ b/Tests/WWLayoutTests/SafeAreaTests.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // SafeAreaTests.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import XCTest diff --git a/Tests/WWLayoutTests/SiblingTests.swift b/Tests/WWLayoutTests/SiblingTests.swift index a5d0255..f9d81be 100644 --- a/Tests/WWLayoutTests/SiblingTests.swift +++ b/Tests/WWLayoutTests/SiblingTests.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // SiblingTests.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import XCTest diff --git a/Tests/WWLayoutTests/SizeClassTests.swift b/Tests/WWLayoutTests/SizeClassTests.swift index b7de7cc..036cdbc 100644 --- a/Tests/WWLayoutTests/SizeClassTests.swift +++ b/Tests/WWLayoutTests/SizeClassTests.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // SizeClassTests.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2019 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import XCTest diff --git a/Tests/WWLayoutTests/StackingTests.swift b/Tests/WWLayoutTests/StackingTests.swift index 0dcc7e3..fcb4cbd 100644 --- a/Tests/WWLayoutTests/StackingTests.swift +++ b/Tests/WWLayoutTests/StackingTests.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // StackingTests.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2019 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import XCTest diff --git a/Tests/WWLayoutTests/SwiftCompatibility.swift b/Tests/WWLayoutTests/SwiftCompatibility.swift index 77c29e0..b9b6af8 100644 --- a/Tests/WWLayoutTests/SwiftCompatibility.swift +++ b/Tests/WWLayoutTests/SwiftCompatibility.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // SwiftCompatibility.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import UIKit diff --git a/WWLayout.xcodeproj/project.pbxproj b/WWLayout.xcodeproj/project.pbxproj index dddf398..89d60b5 100644 --- a/WWLayout.xcodeproj/project.pbxproj +++ b/WWLayout.xcodeproj/project.pbxproj @@ -234,7 +234,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0910; - LastUpgradeCheck = 1200; + LastUpgradeCheck = 1230; ORGANIZATIONNAME = "WW International, Inc."; TargetAttributes = { 798F251F1FD18FA4006E6A44 = { diff --git a/WWLayout.xcodeproj/xcshareddata/IDETemplateMacros.plist b/WWLayout.xcodeproj/xcshareddata/IDETemplateMacros.plist index be8fd7e..47aec57 100644 --- a/WWLayout.xcodeproj/xcshareddata/IDETemplateMacros.plist +++ b/WWLayout.xcodeproj/xcshareddata/IDETemplateMacros.plist @@ -4,7 +4,7 @@ FILEHEADER -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // ___FILENAME___ // @@ -30,7 +30,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // diff --git a/WWLayoutExample/WWLayoutExample.xcodeproj/xcshareddata/IDETemplateMacros.plist b/WWLayoutExample/WWLayoutExample.xcodeproj/xcshareddata/IDETemplateMacros.plist index be8fd7e..47aec57 100644 --- a/WWLayoutExample/WWLayoutExample.xcodeproj/xcshareddata/IDETemplateMacros.plist +++ b/WWLayoutExample/WWLayoutExample.xcodeproj/xcshareddata/IDETemplateMacros.plist @@ -4,7 +4,7 @@ FILEHEADER -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // ___FILENAME___ // @@ -30,7 +30,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // diff --git a/WWLayoutExample/WWLayoutExample/AppDelegate.swift b/WWLayoutExample/WWLayoutExample/AppDelegate.swift index c0bbf59..327a947 100644 --- a/WWLayoutExample/WWLayoutExample/AppDelegate.swift +++ b/WWLayoutExample/WWLayoutExample/AppDelegate.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // AppDelegate.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import UIKit diff --git a/WWLayoutExample/WWLayoutExample/SampleListViewController.swift b/WWLayoutExample/WWLayoutExample/SampleListViewController.swift index 8459f24..6751567 100644 --- a/WWLayoutExample/WWLayoutExample/SampleListViewController.swift +++ b/WWLayoutExample/WWLayoutExample/SampleListViewController.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // SampleListViewController.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import UIKit diff --git a/WWLayoutExample/WWLayoutExample/Samples/Baselines.swift b/WWLayoutExample/WWLayoutExample/Samples/Baselines.swift index fcc7fd2..bf41d12 100644 --- a/WWLayoutExample/WWLayoutExample/Samples/Baselines.swift +++ b/WWLayoutExample/WWLayoutExample/Samples/Baselines.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // Baselines.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import UIKit diff --git a/WWLayoutExample/WWLayoutExample/Samples/BasicSample.swift b/WWLayoutExample/WWLayoutExample/Samples/BasicSample.swift index 22b8dd8..be33145 100644 --- a/WWLayoutExample/WWLayoutExample/Samples/BasicSample.swift +++ b/WWLayoutExample/WWLayoutExample/Samples/BasicSample.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // BasicSample.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import UIKit diff --git a/WWLayoutExample/WWLayoutExample/Samples/CenterEdges.swift b/WWLayoutExample/WWLayoutExample/Samples/CenterEdges.swift index 83352fb..0c48d49 100644 --- a/WWLayoutExample/WWLayoutExample/Samples/CenterEdges.swift +++ b/WWLayoutExample/WWLayoutExample/Samples/CenterEdges.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // CenterEdges.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import UIKit diff --git a/WWLayoutExample/WWLayoutExample/Samples/FillWidthSample.swift b/WWLayoutExample/WWLayoutExample/Samples/FillWidthSample.swift index 5ebc0b4..e45d242 100644 --- a/WWLayoutExample/WWLayoutExample/Samples/FillWidthSample.swift +++ b/WWLayoutExample/WWLayoutExample/Samples/FillWidthSample.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // FillWidthSample.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import UIKit diff --git a/WWLayoutExample/WWLayoutExample/Samples/LayoutMarginsSample.swift b/WWLayoutExample/WWLayoutExample/Samples/LayoutMarginsSample.swift index 5ce8e5d..7ba67da 100644 --- a/WWLayoutExample/WWLayoutExample/Samples/LayoutMarginsSample.swift +++ b/WWLayoutExample/WWLayoutExample/Samples/LayoutMarginsSample.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // LayoutMarginsSample.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import UIKit diff --git a/WWLayoutExample/WWLayoutExample/Samples/SafeAreaSample.swift b/WWLayoutExample/WWLayoutExample/Samples/SafeAreaSample.swift index 64d6af0..60baf18 100644 --- a/WWLayoutExample/WWLayoutExample/Samples/SafeAreaSample.swift +++ b/WWLayoutExample/WWLayoutExample/Samples/SafeAreaSample.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // SafeAreaSample.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import UIKit diff --git a/WWLayoutExample/WWLayoutExample/Samples/SampleViewController.swift b/WWLayoutExample/WWLayoutExample/Samples/SampleViewController.swift index 4e47a74..ec570a5 100644 --- a/WWLayoutExample/WWLayoutExample/Samples/SampleViewController.swift +++ b/WWLayoutExample/WWLayoutExample/Samples/SampleViewController.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // SampleViewController.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import UIKit diff --git a/WWLayoutExample/WWLayoutExample/Samples/SizeClassSample.swift b/WWLayoutExample/WWLayoutExample/Samples/SizeClassSample.swift index 16391b6..0a51c6c 100644 --- a/WWLayoutExample/WWLayoutExample/Samples/SizeClassSample.swift +++ b/WWLayoutExample/WWLayoutExample/Samples/SizeClassSample.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // SizeClassSample.swift // WWLayoutExample @@ -12,7 +12,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import UIKit diff --git a/WWLayoutExample/WWLayoutExample/Samples/TaggingSample.swift b/WWLayoutExample/WWLayoutExample/Samples/TaggingSample.swift index f7d2faf..15f9647 100644 --- a/WWLayoutExample/WWLayoutExample/Samples/TaggingSample.swift +++ b/WWLayoutExample/WWLayoutExample/Samples/TaggingSample.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // TaggingSample.swift // WWLayoutExample @@ -12,7 +12,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import UIKit diff --git a/WWLayoutExample/WWLayoutExample/Samples/ThreeEdges.swift b/WWLayoutExample/WWLayoutExample/Samples/ThreeEdges.swift index f93bb20..c8c79ce 100644 --- a/WWLayoutExample/WWLayoutExample/Samples/ThreeEdges.swift +++ b/WWLayoutExample/WWLayoutExample/Samples/ThreeEdges.swift @@ -1,5 +1,5 @@ // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // // ThreeEdges.swift // @@ -11,7 +11,7 @@ // // https://github.com/ww-tech/wwlayout // -// Copyright © 2017-2018 WW International, Inc. +// Copyright © 2017-2021 WW International, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//===----------------------------------------------------------------------===// +// ===----------------------------------------------------------------------===// // import UIKit diff --git a/WWLayoutExample/WWLayoutTV/WWLayoutTV.xcodeproj/xcshareddata/IDETemplateMacros.plist b/WWLayoutExample/WWLayoutTV/WWLayoutTV.xcodeproj/xcshareddata/IDETemplateMacros.plist new file mode 100644 index 0000000..47aec57 --- /dev/null +++ b/WWLayoutExample/WWLayoutTV/WWLayoutTV.xcodeproj/xcshareddata/IDETemplateMacros.plist @@ -0,0 +1,36 @@ + + + + + FILEHEADER + +// ===----------------------------------------------------------------------===// +// +// ___FILENAME___ +// +// Created by ___FULLUSERNAME___ on ___DATE___ +// Copyright © ___YEAR___ WW International, Inc. +// +// +// This source file is part of the WWLayout open source project +// +// https://github.com/ww-tech/wwlayout +// +// Copyright © 2017-___YEAR___ WW International, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ===----------------------------------------------------------------------===// +// + + diff --git a/WWLayoutExample/WWLayoutTV/WWLayoutTV/AppDelegate.swift b/WWLayoutExample/WWLayoutTV/WWLayoutTV/AppDelegate.swift index d378a5c..61358d7 100644 --- a/WWLayoutExample/WWLayoutTV/WWLayoutTV/AppDelegate.swift +++ b/WWLayoutExample/WWLayoutTV/WWLayoutTV/AppDelegate.swift @@ -1,10 +1,33 @@ // +// ===----------------------------------------------------------------------===// +// // AppDelegate.swift // WWLayoutTV // // Created by Steven Grosmark on 1/7/20. // Copyright © 2020 WW International. All rights reserved. // +// +// This source file is part of the WWLayout open source project +// +// https://github.com/ww-tech/wwlayout +// +// Copyright © 2017-2021 WW International, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ===----------------------------------------------------------------------===// +// import UIKit diff --git a/WWLayoutExample/WWLayoutTV/WWLayoutTV/ViewController.swift b/WWLayoutExample/WWLayoutTV/WWLayoutTV/ViewController.swift index da89188..598d759 100644 --- a/WWLayoutExample/WWLayoutTV/WWLayoutTV/ViewController.swift +++ b/WWLayoutExample/WWLayoutTV/WWLayoutTV/ViewController.swift @@ -1,10 +1,33 @@ // +// ===----------------------------------------------------------------------===// +// // ViewController.swift // WWLayoutTV // // Created by Steven Grosmark on 1/7/20. // Copyright © 2020 WW International. All rights reserved. // +// +// This source file is part of the WWLayout open source project +// +// https://github.com/ww-tech/wwlayout +// +// Copyright © 2017-2021 WW International, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ===----------------------------------------------------------------------===// +// import UIKit import WWLayout diff --git a/WWLayoutExample/WWLayoutTV/WWLayoutTVTests/WWLayoutTVTests.swift b/WWLayoutExample/WWLayoutTV/WWLayoutTVTests/WWLayoutTVTests.swift index 28ad9de..2837bfa 100644 --- a/WWLayoutExample/WWLayoutTV/WWLayoutTVTests/WWLayoutTVTests.swift +++ b/WWLayoutExample/WWLayoutTV/WWLayoutTVTests/WWLayoutTVTests.swift @@ -1,10 +1,33 @@ // +// ===----------------------------------------------------------------------===// +// // WWLayoutTVTests.swift // WWLayoutTVTests // // Created by Steven Grosmark on 1/7/20. // Copyright © 2020 WW International. All rights reserved. // +// +// This source file is part of the WWLayout open source project +// +// https://github.com/ww-tech/wwlayout +// +// Copyright © 2017-2021 WW International, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ===----------------------------------------------------------------------===// +// import XCTest import WWLayout From e9e5098c8cdad1e2932636d1d46277e490b39739 Mon Sep 17 00:00:00 2001 From: Steven Grosmark Date: Sat, 6 Feb 2021 14:44:02 -0500 Subject: [PATCH 5/7] Fix line length --- Sources/WWLayout/Layout+Fill.swift | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/Sources/WWLayout/Layout+Fill.swift b/Sources/WWLayout/Layout+Fill.swift index 3489bdd..fc3bd25 100644 --- a/Sources/WWLayout/Layout+Fill.swift +++ b/Sources/WWLayout/Layout+Fill.swift @@ -292,7 +292,15 @@ extension Layout { priority: LayoutPriority? = nil, tag: Int? = nil, active: Bool? = nil) -> Layout { - return fillWidth(of: special.anchorable(with: view), inset: Insets(inset), maximum: maximum, alignTo: edge, priority: priority, tag: tag, active: active) + return fillWidth( + of: special.anchorable(with: view), + inset: Insets(inset), + maximum: maximum, + alignTo: edge, + priority: priority, + tag: tag, + active: active + ) } /// Set the view so it fills the width of another view, with a maximum allowed width. @@ -308,7 +316,15 @@ extension Layout { priority: LayoutPriority? = nil, tag: Int? = nil, active: Bool? = nil) -> Layout { - return fillWidth(of: special.anchorable(with: view), inset: Insets(inset), maximum: maximum, alignTo: edge, priority: priority, tag: tag, active: active) + return fillWidth( + of: special.anchorable(with: view), + inset: Insets(inset), + maximum: maximum, + alignTo: edge, + priority: priority, + tag: tag, + active: active + ) } } From 4cdf4292936198803d8d103a51922009e06ff4fe Mon Sep 17 00:00:00 2001 From: Steven Grosmark Date: Sat, 6 Feb 2021 14:44:18 -0500 Subject: [PATCH 6/7] Update project files --- .../xcshareddata/xcschemes/WWLayout.xcscheme | 28 +++--- .../WWLayoutExample.xcodeproj/project.pbxproj | 2 +- .../xcschemes/WWLayoutExample.xcscheme | 2 +- .../WWLayoutTV.xcodeproj/project.pbxproj | 4 +- .../xcschemes/WWLayoutTV.xcscheme | 88 +++++++++++++++++++ 5 files changed, 105 insertions(+), 19 deletions(-) create mode 100644 WWLayoutExample/WWLayoutTV/WWLayoutTV.xcodeproj/xcshareddata/xcschemes/WWLayoutTV.xcscheme diff --git a/WWLayout.xcodeproj/xcshareddata/xcschemes/WWLayout.xcscheme b/WWLayout.xcodeproj/xcshareddata/xcschemes/WWLayout.xcscheme index 4f02155..c30e537 100644 --- a/WWLayout.xcodeproj/xcshareddata/xcschemes/WWLayout.xcscheme +++ b/WWLayout.xcodeproj/xcshareddata/xcschemes/WWLayout.xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES" + codeCoverageEnabled = "YES"> + + + + @@ -40,17 +49,6 @@ - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From e90f8f06fc7007cecf8e77796d9b9d565c99a3e6 Mon Sep 17 00:00:00 2001 From: Steven Grosmark Date: Thu, 11 Feb 2021 11:17:18 -0500 Subject: [PATCH 7/7] Bump version to 0.8.0 --- WWLayout.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WWLayout.podspec b/WWLayout.podspec index 3f4af07..7dda00d 100644 --- a/WWLayout.podspec +++ b/WWLayout.podspec @@ -9,7 +9,7 @@ Pod::Spec.new do |s| s.name = "WWLayout" - s.version = "0.7.1" + s.version = "0.8.0" s.summary = "Swifty DSL for programmatic Auto Layout in iOS" s.description = "WWLayout is an elegant way to add auto-layout constraints with code." s.homepage = "https://ww-tech.github.io/wwlayout/" @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.license = "Apache-2.0" s.author = { "Steven Grosmark" => "steven.grosmark@weightwatchers.com" } s.platform = :ios, "9.0" - s.swift_versions = '4.0', '4.2', '5', '5.1', '5.2' + s.swift_versions = '4.0', '4.2', '5', '5.1', '5.2', '5.3' s.source = { :git => "https://github.com/ww-tech/wwlayout.git", :tag => s.version.to_s } s.source_files = "Sources/WWLayout", "Sources/WWLayout/**/*.{h,m,swift}"