1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Can I programatically move a control?

Discussion in 'iPhone/iPad Programming' started by scooterf, Apr 12, 2009.

  1. macrumors newbie

    #1
    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
     
  2. macrumors member

    #2
    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.
     
  3. macrumors 603

    #3
    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
     
  4. macrumors newbie

    #4
    that tutorial is perfect. Thanks.
     

Share This Page