当用户选择切片并让切片停在方向盘顶部时,我正在尝试旋转饼图轮
// start from the middle of the slice angle
let startAngle = self.slicesArray[index].angle / 2
// end at top of chart
let endAngle = //?
let angleDifference = //?
UIView.animateWithDuration(0.4, animations: {
self.transform = CGAffineTransformRotate(self.transform, -angleDifference)
})
答案 0 :(得分:0)
你为endAngle尝试了3/2π吗?差异显然是endAngle - startAngle