为什么SegmentedControl在swift中单击时会向后移动

时间:2015-02-09 13:31:56

标签: ios swift

我在SegmentedControl函数中设置viewdidAppear的变换并更改SegmentedControl的位置,当我点击SegmentedControl时,SegmentedControl的位置发生变化(向后移动) )

override func viewDidAppear(animated: Bool) {
    super.viewDidAppear(animated)
    self.videoSegmented.transform = CGAffineTransformRotate(self.videoSegmented.transform, CGFloat(self.degreesToRadians(90)));
    var frame = self.videoSegmented.frame
    self.videoSegmented.frame = self.seguementView.frame
}

func degreesToRadians(x:Double) -> Double{
    return M_PI * x / 180
}

0 个答案:

没有答案