小编nod*_*90z的帖子

每次单击按钮时,将UIButton旋转90度

每次单击按钮时如何将UIButton旋转90度并跟踪每个旋转的位置/角度?

这是我到目前为止的代码,但它只旋转一次:

@IBAction func gameButton(sender: AnyObject) {
    UIView.animateWithDuration(0.05, animations: ({
        self.gameButtonLabel.transform = CGAffineTransformMakeRotation(CGFloat(M_PI_2))
    }))
}
Run Code Online (Sandbox Code Playgroud)

rotation uibutton ios swift

21
推荐指数
2
解决办法
1万
查看次数

标签 统计

ios ×1

rotation ×1

swift ×1

uibutton ×1