So I was working on trying to make a simple animation of a button in my app. I have a button in a container centered on the view using auto layout.
I am looking to move the button upwards in the view and stay horizontally centered
So far I got this
UIView.animateWithDuration(1.0, animations:
{
self.ButtonViewController.frame = CGRect(x: (SOME VALUE), y: 0, width: 600, height: 113)
})
What value could I use for x to keep in centered in the view for all screen sizes?
Thanks!