Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

scooterf

macrumors newbie
Original poster
Apr 12, 2009
3
0
Suppose I have a UIButton...can I programatically change the x and y locations of the button on the screen? What would the property be? New to this....

Thanks
 

iphonedevelop18

macrumors member
Feb 26, 2009
50
0
watch this tutorial, it should give you a general idea of grabbing the x and y values of an object in the code and play around with it a little.
 

firewood

macrumors G3
Jul 29, 2003
8,141
1,384
Silicon Valley
Yes. You can even animate the movement.

To find the relevant property, just read the definition and reference for UIButton, and follow the chain of whatever classes it inherits from. All built into XCode.

o
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.