mirror of https://github.com/SnapKit/SnapKit
Revert insets to inset
This commit is contained in:
parent
f997f2e5c7
commit
7cb3a61c14
|
@ -5,7 +5,6 @@ CHANGELOG
|
||||||
|
|
||||||
* **BREAKING:** The constraint making chain now utilises protocols to tighten the API's to avoid user error. This may break some syntaxes.
|
* **BREAKING:** The constraint making chain now utilises protocols to tighten the API's to avoid user error. This may break some syntaxes.
|
||||||
* **BREAKING:** Semantic `and` and `with` chain variables were removed
|
* **BREAKING:** Semantic `and` and `with` chain variables were removed
|
||||||
* **BREAKING:** `insets` deprecated and renamed to `inset`
|
|
||||||
* Ensure Swift 1.2 compatibility
|
* Ensure Swift 1.2 compatibility
|
||||||
* Added a `Snap.Config.interfaceLayoutDirection` variable for richer Leading/Trailing support.
|
* Added a `Snap.Config.interfaceLayoutDirection` variable for richer Leading/Trailing support.
|
||||||
* Fixed memory leaks that could occur on long lived views
|
* Fixed memory leaks that could occur on long lived views
|
||||||
|
|
|
@ -84,9 +84,6 @@ public protocol ConstraintBuilderOffsetable: ConstraintBuilderMultipliable {
|
||||||
func offset(amount: CGSize) -> ConstraintBuilderMultipliable
|
func offset(amount: CGSize) -> ConstraintBuilderMultipliable
|
||||||
func offset(amount: EdgeInsets) -> ConstraintBuilderMultipliable
|
func offset(amount: EdgeInsets) -> ConstraintBuilderMultipliable
|
||||||
|
|
||||||
func inset(amount: EdgeInsets) -> ConstraintBuilderMultipliable
|
|
||||||
|
|
||||||
@availability(*, deprecated=0.10.0, renamed="inset")
|
|
||||||
func insets(amount: EdgeInsets) -> ConstraintBuilderMultipliable
|
func insets(amount: EdgeInsets) -> ConstraintBuilderMultipliable
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -423,15 +420,12 @@ final internal class ConstraintBuilder: Constraint, ConstraintBuilderExtendable,
|
||||||
return self
|
return self
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: inset
|
// MARK: insets
|
||||||
|
|
||||||
func inset(amount: EdgeInsets) -> ConstraintBuilderMultipliable {
|
func insets(amount: EdgeInsets) -> ConstraintBuilderMultipliable {
|
||||||
self.constant = EdgeInsets(top: amount.top, left: amount.left, bottom: -amount.bottom, right: -amount.right)
|
self.constant = EdgeInsets(top: amount.top, left: amount.left, bottom: -amount.bottom, right: -amount.right)
|
||||||
return self
|
return self
|
||||||
}
|
}
|
||||||
func insets(amount: EdgeInsets) -> ConstraintBuilderMultipliable {
|
|
||||||
return self.inset(amount)
|
|
||||||
}
|
|
||||||
|
|
||||||
// MARK: Constraint
|
// MARK: Constraint
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue