我的怎么不动
import UIKit
class donghuaViewController: UIViewController {
@IBOutlet weak var blue: UIView!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
override func viewDidDisappear(animated: Bool) {
UIView.animateWithDuration(1, animations: {
self.blue.center.x=self.view.bounds.width - self.blue.center.x;
})
}
我这个有错吗?怎么不动?