当size从frame中获取时,必须先设置尺寸,再设置center。
正常显示


如果先设置center再设置尺寸如下:

当size从bounds中获取,就不需要考虑前后顺序。

frame是从左上角到右下角延伸。
bounds是从中间往四周扩散。
当size从frame中获取时,必须先设置尺寸,再设置center。
正常显示
如果先设置center再设置尺寸如下:
当size从bounds中获取,就不需要考虑前后顺序。
frame是从左上角到右下角延伸。
bounds是从中间往四周扩散。
本文标题:center、size
本文链接:https://www.haomeiwen.com/subject/ifijrttx.html
网友评论