I've got this block of code in my ViewWillAppear method which simply moves a set of labels down off the screen:
override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
//Hide 1,3,5 RM labels
oneRepMax.center.y += view.bounds.height
threeRepMax.center.y += view.bounds.height
fiveRepMax.center.y += view.bounds.height
}
All 3 labels have been properly linked to my storyboard file. When I run the project, nothing happens.
If I copy the exact same code into a method linked to a button, it works as expected.
There isn't anything else in the project so i'm puzzled as to why this doesn't work.
I'm using Xcode 7 and following a tutorial where this is working in the ViewWillAppearMethod. as follows:
override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
heading.center.x -= view.bounds.width
username.center.x -= view.bounds.width
password.center.x -= view.bounds.width
loginButton.center.y += 30
loginButton.alpha = 0
}