I draw a custom UIbutton. Now I want, that the 0,0-point is in the middle of the object. Not on top-left-corner. So If I set the position of this button in a view to the middle point of the view, the button is really in the middle and I dont have to add the half of the width and the half of the height.
If I set the position of the object to the middle of a view it should look this:
and not like this:
You're modifying the origin of the frame, each view has a property
center which does exactly what you want.