0
I need some sliders placed via storyboard to adapt to the screen size when placed upright.
For example I put three sliders on the screen and put your 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 stayed that way:
To stay upright I used Cgaffinetransformmakerotation this way for each one:
@IBOutlet var slider01: UISlider! {
didSet{
slider01.transform = CGAffineTransformMakeRotation(CGFloat(-M_PI_2))
}
}
After running this application the screen stays this way:
However I would like the sliders to be 20 px from the top and bottom edges, so:
Any suggestions?
Already solved? In the last two sliders you set for them to have the same width of the first.. but you set the width of the first to a certain value?
– CCastro
The width of the first slider is automatic because of the other constraints already defined.
– Arubu