@ -304,7 +304,6 @@ class CallViewController: UIViewController, CallObserver, CallServiceObserver, R
// I f t h e r e ' s m o r e t h a n o n e s u b v i e w i n t h e r o w ,
// I f t h e r e ' s m o r e t h a n o n e s u b v i e w i n t h e r o w ,
// s p a c e t h e m e v e n l y w i t h i n t h e r o w .
// s p a c e t h e m e v e n l y w i t h i n t h e r o w .
var lastSubview : UIView ?
var lastSubview : UIView ?
var lastSpacer : UIView ?
for subview in subviews {
for subview in subviews {
row . addSubview ( subview )
row . addSubview ( subview )
subview . setContentHuggingHorizontalHigh ( )
subview . setContentHuggingHorizontalHigh ( )
@ -318,10 +317,13 @@ class CallViewController: UIViewController, CallObserver, CallServiceObserver, R
spacer . autoPinEdge ( . right , to : . left , of : subview )
spacer . autoPinEdge ( . right , to : . left , of : subview )
spacer . setContentHuggingHorizontalLow ( )
spacer . setContentHuggingHorizontalLow ( )
spacer . autoVCenterInSuperview ( )
spacer . autoVCenterInSuperview ( )
if lastSpacer != nil {
spacer . autoMatch ( . width , to : . width , of : lastSpacer ! )
if subviews . count = = 2 {
// s p e c i a l c a s e t o h a r d c o d e t h e s p a c e r ' s s i z e w h e n t h e r e i s o n l y 1 s p a c e r .
spacer . autoSetDimension ( . width , toSize : ScaleFromIPhone5To7Plus ( 46 , 60 ) )
} else {
spacer . autoSetDimension ( . width , toSize : ScaleFromIPhone5To7Plus ( 3 , 5 ) )
}
}
lastSpacer = spacer
}
}
lastSubview = subview
lastSubview = subview