Tag: rotatetransform

Swift:在iOS8中旋转一个button?

比方说,我的ViewController上有一个或多个100 * 50的矩形button。 import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } @IBAction func myButton(sender: UIButton) { } } 通常我把我的graphics图像作为他们的形象。 然后我应用自动布局。 但! 我需要他们倾斜不水平,如果你有一个正方形IE,我需要旋转它是一个钻石(45°),这是相同的。 我知道这是不可能通过接口生成器。 […]