Vertical slider - adapt size

0

I need some sliders placed via storyboard to fit the screen size when placed in upright position.

For example, I put three sliders on the screen and put their contraints so that they have the same width and stay at 20 px equidistant, they are also 20 px from each edge of the screen. They looked like this:

Inordertostayupright,IusedCGAffineTransformMakeRotationinthiswayforeach:

@IBOutletvarslider01:UISlider!{didSet{slider01.transform=CGAffineTransformMakeRotation(CGFloat(-M_PI_2))}}

Afterrunningthisapplicationthescreenlookslikethis:

ButIwouldlikethesliderstobe20pxfromthetopandbottomedges,likethis:

Any suggestions?

    
asked by anonymous 05.02.2016 / 13:49

0 answers