Vertical UISlider in iOS with autolayout

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

    You can't use storyboard to build up a UISlider. Build up UISlider by coding.

    slider = [[UISlider alloc] initWithFrame:CGRectMake(640, 150, 600, 400)];
    [slider.layer setAnchorPoint:CGPointMake(0.0f, 0.0f)];
    slider.transform = CGAffineTransformMakeRotation(M_PI/2);
    [self.view addSubview:slider];
    

提交回复
热议问题