CGPointMake in Respect to other UIImageViews

I have a UIImageView called hitBox, and another image called mainSprite. So what I want to do is when an IBAction is pressed, it will move hitBox to above mainSprite. I don't know if this is syntax but this is what I know moves things on the screen.

hitBox.center = CGPointMake(x coordinate, y coordinate);


I just want to replace x coordinate and y coordinate with something that will place it somewhere in relation mainSprite.

• is your mainsprite a sprite. – Robin Feb 2 '12 at 5:13
• Woeful lack of research here. – MichaelHouse Apr 18 '12 at 20:45

Why not hitBox.center=mainSprite.center ?
hitBox.center= CGPointMake(mainSprite.center.x,mainSprite.center.y+5);