Hi,
I am new to objective-c and have completed a few tutorials which I am now adapting to learn more!
I have a button (which was made via the interface builder) which I am moving randomly using the following code.
However after the button is pressed it reverts to the original position that the button was from the interface builder. I've found turning off auto layout will sort it but figured there would be another way?
Hope someone can point me in the right direction!
Thanks
I am new to objective-c and have completed a few tutorials which I am now adapting to learn more!
I have a button (which was made via the interface builder) which I am moving randomly using the following code.
Code:
button.center = CGPointMake(arc4random_uniform(200), arc4random_uniform(500));
However after the button is pressed it reverts to the original position that the button was from the interface builder. I've found turning off auto layout will sort it but figured there would be another way?
Hope someone can point me in the right direction!
Thanks