I am trying to implement this cool feature where the logo moves a little after loading the application and the login window appears. The problem is that when I use this code:
override func viewDidLoad() {
super.viewDidLoad()
UIView.animateWithDuration(2, animations: {
var newCenter = self.logoImage.center
newCenter.y -= 100
self.logoImage.center = newCenter
}, completion: { finished in
println("Basket doors opened!")
})
}
The logo moves to its original location from where I want to move it. So, in this example, the logo appears already with (y-100), and then moves to the beginning of X, Y.
source
share