Vertical UISlider in iOS with autolayout

后端 未结 10 1994
难免孤独
难免孤独 2021-02-07 07:22

As per my iPad app requirement, i\'ve to show the UISlider vertically.
I\'m using iOS7 compiler and deployment target is iOS6.
In the story board I added horizontal UISl

10条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-07 07:44

    Try below code to Rotate the UISlider in Vertical Position..

    //To rotate the slider in Vertical Position
    CGAffineTransform sliderRotation = CGAffineTransformIdentity;
    sliderRotation = CGAffineTransformRotate(sliderRotation, -(M_PI / 2));
    sliderBrightness.transform=sliderRotation;
    

提交回复
热议问题