Vertical UISlider in iOS with autolayout

后端 未结 10 2011
难免孤独
难免孤独 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:42

    There are so many possible solutions around about putting UISlider vertical. Here is my summary for iOS7 in XCode5 with autoLayout enabled(defaultly in storyboard):

    1. in viewDidLoad add method self.slider.transform = CGAffineTransformMakeRotation(M_PI_2);

    2. define your autoLayout constraints about slider explicitly in storyboard as whatever you like

提交回复
热议问题