@@ -69,8 +69,8 @@ class PinLayoutImpl: PinLayout {
69
69
}
70
70
71
71
deinit {
72
- if !isLayouted && Pin . warnMissingLayoutCalls {
73
- warn ( " PinLayout commands have been issued without calling the 'layout()' method to complete the layout. (These warnings can be disabled by setting Pin.warnMissingLayoutCalls to false) " )
72
+ if !isLayouted && Pin . logMissingLayoutCalls {
73
+ warn ( " PinLayout commands have been issued without calling the 'layout()' method to complete the layout. (These warnings can be disabled by setting Pin.logMissingLayoutCalls to false) " )
74
74
}
75
75
apply ( )
76
76
}
@@ -91,7 +91,7 @@ class PinLayoutImpl: PinLayout {
91
91
92
92
@discardableResult
93
93
func top( _ percent: Percent ) -> PinLayout {
94
- func context( ) -> String { return " top( \( percent) ) " }
94
+ func context( ) -> String { return " top( \( percent. description ) ) " }
95
95
guard let layoutSuperview = layoutSuperview ( context) else { return self }
96
96
setTop ( percent. of ( layoutSuperview. frame. height) , context)
97
97
return self
@@ -109,7 +109,7 @@ class PinLayoutImpl: PinLayout {
109
109
110
110
@discardableResult
111
111
func left( _ percent: Percent ) -> PinLayout {
112
- return left ( percent, { return " left( \( percent) ) " } )
112
+ return left ( percent, { return " left( \( percent. description ) ) " } )
113
113
}
114
114
115
115
@discardableResult
@@ -126,7 +126,7 @@ class PinLayoutImpl: PinLayout {
126
126
127
127
@discardableResult
128
128
func start( _ percent: Percent ) -> PinLayout {
129
- func context( ) -> String { return " start( \( percent) ) " }
129
+ func context( ) -> String { return " start( \( percent. description ) ) " }
130
130
return isLTR ( ) ? left ( percent, context) : right ( percent, context)
131
131
}
132
132
@@ -141,7 +141,7 @@ class PinLayoutImpl: PinLayout {
141
141
142
142
@discardableResult
143
143
func bottom( _ percent: Percent ) -> PinLayout {
144
- func context( ) -> String { return " bottom( \( percent) ) " }
144
+ func context( ) -> String { return " bottom( \( percent. description ) ) " }
145
145
guard let layoutSuperview = layoutSuperview ( context) else { return self }
146
146
bottom ( percent. of ( layoutSuperview. frame. height) , context)
147
147
return self
@@ -158,7 +158,7 @@ class PinLayoutImpl: PinLayout {
158
158
159
159
@discardableResult
160
160
func right( _ percent: Percent ) -> PinLayout {
161
- return right ( percent, { return " right( \( percent) ) " } )
161
+ return right ( percent, { return " right( \( percent. description ) ) " } )
162
162
}
163
163
164
164
@discardableResult func end( ) -> PinLayout {
@@ -174,7 +174,7 @@ class PinLayoutImpl: PinLayout {
174
174
175
175
@discardableResult
176
176
func end( _ percent: Percent ) -> PinLayout {
177
- func context( ) -> String { return " end( \( percent) ) " }
177
+ func context( ) -> String { return " end( \( percent. description ) ) " }
178
178
return isLTR ( ) ? right ( percent, context) : left ( percent, context)
179
179
}
180
180
@@ -196,7 +196,7 @@ class PinLayoutImpl: PinLayout {
196
196
197
197
@discardableResult
198
198
func hCenter( _ percent: Percent ) -> PinLayout {
199
- func context( ) -> String { return " hCenter( \( percent) ) " }
199
+ func context( ) -> String { return " hCenter( \( percent. description ) ) " }
200
200
guard let layoutSuperview = layoutSuperview ( context) else { return self }
201
201
setHorizontalCenter ( ( layoutSuperview. frame. width / 2 ) + percent. of ( layoutSuperview. frame. width) , context)
202
202
return self
@@ -220,7 +220,7 @@ class PinLayoutImpl: PinLayout {
220
220
221
221
@discardableResult
222
222
func vCenter( _ percent: Percent ) -> PinLayout {
223
- func context( ) -> String { return " vCenter( \( percent) ) " }
223
+ func context( ) -> String { return " vCenter( \( percent. description ) ) " }
224
224
guard let layoutSuperview = layoutSuperview ( context) else { return self }
225
225
setVerticalCenter ( ( layoutSuperview. frame. height / 2 ) + percent. of ( layoutSuperview. frame. height) , context)
226
226
return self
@@ -607,7 +607,7 @@ class PinLayoutImpl: PinLayout {
607
607
608
608
@discardableResult
609
609
func width( _ percent: Percent ) -> PinLayout {
610
- func context( ) -> String { return " width( \( percent) ) " }
610
+ func context( ) -> String { return " width( \( percent. description ) ) " }
611
611
guard let layoutSuperview = layoutSuperview ( context) else { return self }
612
612
return setWidth ( percent. of ( layoutSuperview. frame. width) , context)
613
613
}
@@ -625,7 +625,7 @@ class PinLayoutImpl: PinLayout {
625
625
626
626
@discardableResult
627
627
func minWidth( _ percent: Percent ) -> PinLayout {
628
- func context( ) -> String { return " minWidth( \( percent) ) " }
628
+ func context( ) -> String { return " minWidth( \( percent. description ) ) " }
629
629
guard let layoutSuperview = layoutSuperview ( context) else { return self }
630
630
return setMinWidth ( percent. of ( layoutSuperview. frame. width) , context)
631
631
}
@@ -638,7 +638,7 @@ class PinLayoutImpl: PinLayout {
638
638
639
639
@discardableResult
640
640
func maxWidth( _ percent: Percent ) -> PinLayout {
641
- func context( ) -> String { return " maxWidth( \( percent) ) " }
641
+ func context( ) -> String { return " maxWidth( \( percent. description ) ) " }
642
642
guard let layoutSuperview = layoutSuperview ( context) else { return self }
643
643
return setMaxWidth ( percent. of ( layoutSuperview. frame. width) , context)
644
644
}
@@ -650,7 +650,7 @@ class PinLayoutImpl: PinLayout {
650
650
651
651
@discardableResult
652
652
func height( _ percent: Percent ) -> PinLayout {
653
- func context( ) -> String { return " height( \( percent) ) " }
653
+ func context( ) -> String { return " height( \( percent. description ) ) " }
654
654
guard let layoutSuperview = layoutSuperview ( context) else { return self }
655
655
return setHeight ( percent. of ( layoutSuperview. frame. height) , context)
656
656
}
@@ -668,7 +668,7 @@ class PinLayoutImpl: PinLayout {
668
668
669
669
@discardableResult
670
670
func minHeight( _ percent: Percent ) -> PinLayout {
671
- func context( ) -> String { return " minHeight( \( percent) ) " }
671
+ func context( ) -> String { return " minHeight( \( percent. description ) ) " }
672
672
guard let layoutSuperview = layoutSuperview ( context) else { return self }
673
673
return setMinHeight ( percent. of ( layoutSuperview. frame. height) , context)
674
674
}
@@ -681,7 +681,7 @@ class PinLayoutImpl: PinLayout {
681
681
682
682
@discardableResult
683
683
func maxHeight( _ percent: Percent ) -> PinLayout {
684
- func context( ) -> String { return " maxHeight( \( percent) ) " }
684
+ func context( ) -> String { return " maxHeight( \( percent. description ) ) " }
685
685
guard let layoutSuperview = layoutSuperview ( context) else { return self }
686
686
return setMaxHeight ( percent. of ( layoutSuperview. frame. height) , context)
687
687
}
@@ -701,7 +701,7 @@ class PinLayoutImpl: PinLayout {
701
701
702
702
@discardableResult
703
703
func size( _ percent: Percent ) -> PinLayout {
704
- func context( ) -> String { return " size( \( percent) ) " }
704
+ func context( ) -> String { return " size( \( percent. description ) ) " }
705
705
guard let layoutSuperview = layoutSuperview ( context) else { return self }
706
706
let size = CGSize ( width: percent. of ( layoutSuperview. frame. width) , height: percent. of ( layoutSuperview. frame. height) )
707
707
return setSize ( size, context)
0 commit comments