@@ -586,7 +586,7 @@ public extension UIView {
586
586
func bottomToSuper( isMargins: Bool = false , offset: CGFloat = 0 ) -> Self {
587
587
if let superview = superview {
588
588
addNewConstraint (
589
- bottomAnchor. constraint ( equalTo: isMargins ? superview. layoutMarginsGuide. bottomAnchor : superview. bottomAnchor, constant: offset) ,
589
+ bottomAnchor. constraint ( equalTo: isMargins ? superview. layoutMarginsGuide. bottomAnchor : superview. bottomAnchor, constant: - offset) ,
590
590
type: . bottom
591
591
)
592
592
} else {
@@ -611,7 +611,7 @@ public extension UIView {
611
611
func bottom( to view: UIView , offset: CGFloat = 0 ) -> Self {
612
612
if view == superview {
613
613
addNewConstraint (
614
- bottomAnchor. constraint ( equalTo: view. layoutMarginsGuide. bottomAnchor, constant: offset) ,
614
+ bottomAnchor. constraint ( equalTo: view. layoutMarginsGuide. bottomAnchor, constant: - offset) ,
615
615
type: . bottom
616
616
)
617
617
} else {
@@ -646,7 +646,7 @@ public extension UIView {
646
646
func bottom( lessThanOrEqualTo view: UIView , offset: CGFloat = 0 ) -> Self {
647
647
if view == superview {
648
648
addNewConstraint (
649
- bottomAnchor. constraint ( lessThanOrEqualTo: view. layoutMarginsGuide. bottomAnchor, constant: offset) ,
649
+ bottomAnchor. constraint ( lessThanOrEqualTo: view. layoutMarginsGuide. bottomAnchor, constant: - offset) ,
650
650
type: . bottom
651
651
)
652
652
} else {
@@ -668,7 +668,7 @@ public extension UIView {
668
668
func rightToSuper( isMargins: Bool = false , offset: CGFloat = 0 ) -> Self {
669
669
if let superview = superview {
670
670
addNewConstraint (
671
- rightAnchor. constraint ( equalTo: isMargins ? superview. layoutMarginsGuide. rightAnchor : superview. rightAnchor, constant: offset) ,
671
+ rightAnchor. constraint ( equalTo: isMargins ? superview. layoutMarginsGuide. rightAnchor : superview. rightAnchor, constant: - offset) ,
672
672
type: . right
673
673
)
674
674
} else {
@@ -693,7 +693,7 @@ public extension UIView {
693
693
func right( to view: UIView , offset: CGFloat = 0 ) -> Self {
694
694
if view == superview {
695
695
addNewConstraint (
696
- rightAnchor. constraint ( equalTo: view. layoutMarginsGuide. rightAnchor, constant: offset) ,
696
+ rightAnchor. constraint ( equalTo: view. layoutMarginsGuide. rightAnchor, constant: - offset) ,
697
697
type: . right
698
698
)
699
699
} else {
@@ -706,7 +706,7 @@ public extension UIView {
706
706
func right( greaterThanOrEqualTo view: UIView , offset: CGFloat = 0 ) -> Self {
707
707
if view == superview {
708
708
addNewConstraint (
709
- rightAnchor. constraint ( greaterThanOrEqualTo: view. layoutMarginsGuide. rightAnchor, constant: offset) ,
709
+ rightAnchor. constraint ( greaterThanOrEqualTo: view. layoutMarginsGuide. rightAnchor, constant: - offset) ,
710
710
type: . right
711
711
)
712
712
} else {
@@ -728,7 +728,7 @@ public extension UIView {
728
728
func right( lessThanOrEqualTo view: UIView , offset: CGFloat = 0 ) -> Self {
729
729
if view == superview {
730
730
addNewConstraint (
731
- rightAnchor. constraint ( lessThanOrEqualTo: view. layoutMarginsGuide. rightAnchor, constant: offset) ,
731
+ rightAnchor. constraint ( lessThanOrEqualTo: view. layoutMarginsGuide. rightAnchor, constant: - offset) ,
732
732
type: . right
733
733
)
734
734
} else {
@@ -750,7 +750,7 @@ public extension UIView {
750
750
func trailingToSuper( isMargins: Bool = false , offset: CGFloat = 0 ) -> Self {
751
751
if let superview = superview {
752
752
addNewConstraint (
753
- trailingAnchor. constraint ( equalTo: isMargins ? superview. layoutMarginsGuide. trailingAnchor : superview. trailingAnchor, constant: offset) ,
753
+ trailingAnchor. constraint ( equalTo: isMargins ? superview. layoutMarginsGuide. trailingAnchor : superview. trailingAnchor, constant: - offset) ,
754
754
type: . trailing
755
755
)
756
756
} else {
@@ -775,7 +775,7 @@ public extension UIView {
775
775
func trailing( to view: UIView , offset: CGFloat = 0 ) -> Self {
776
776
if view == superview {
777
777
addNewConstraint (
778
- trailingAnchor. constraint ( equalTo: view. layoutMarginsGuide. trailingAnchor, constant: offset) ,
778
+ trailingAnchor. constraint ( equalTo: view. layoutMarginsGuide. trailingAnchor, constant: - offset) ,
779
779
type: . trailing
780
780
)
781
781
} else {
@@ -788,7 +788,7 @@ public extension UIView {
788
788
func trailing( greaterThanOrEqualTo view: UIView , offset: CGFloat = 0 ) -> Self {
789
789
if view == superview {
790
790
addNewConstraint (
791
- trailingAnchor. constraint ( greaterThanOrEqualTo: view. layoutMarginsGuide. trailingAnchor, constant: offset) ,
791
+ trailingAnchor. constraint ( greaterThanOrEqualTo: view. layoutMarginsGuide. trailingAnchor, constant: - offset) ,
792
792
type: . trailing
793
793
)
794
794
} else {
@@ -810,7 +810,7 @@ public extension UIView {
810
810
func trailing( lessThanOrEqualTo view: UIView , offset: CGFloat = 0 ) -> Self {
811
811
if view == superview {
812
812
addNewConstraint (
813
- trailingAnchor. constraint ( lessThanOrEqualTo: view. layoutMarginsGuide. trailingAnchor, constant: offset) ,
813
+ trailingAnchor. constraint ( lessThanOrEqualTo: view. layoutMarginsGuide. trailingAnchor, constant: - offset) ,
814
814
type: . trailing
815
815
)
816
816
} else {
0 commit comments