How to get an x and a y for a CGRect to initialize a control with a frame?

后端 未结 3 1236
暖寄归人
暖寄归人 2021-01-20 12:00

I\'m programming an iPhone app and I\'m wondering how programmers properly position controls without using Interface Builder. More or less, this is because I want to positio

3条回答
  •  无人及你
    2021-01-20 12:24

    If you don't want use IB, there is no miracle solution. You must keep in mind the dimension of the iPod/iPhone (320px*480px).

    In general you have to center your GUI component in the x axis and then adjust your component on the y axis.

提交回复
热议问题