《View Programming Guide for iOS》之frame、bounds和center之间的关系

  • The frame property contains the frame rectangle, which specifies the size and location of the view in its superview’s coordinate system.   

         frame是指定父视图的位置和大小的

  • The bounds property contains the bounds rectangle, which specifies the size of the view (and its content origin) in the view’s own local coordinate system. 

  •     bounds是指定当前视图的大小和位置的
  • The center property contains the known center point of the view in the superview’s coordinate system.

  •     center是指定在父视图的坐标系统中视图的中心位置

frame_bounds_rects.jpg

其他博客的一些看法

然后呢 看一下frame、bounds跟center三者的定义描述

frame:描述当前视图在其父视图中的位置和大小

bounds:描述当前视图在其自身坐标系统中的位置和大小。 

center:描述当前视图的中心点在其父视图中的位置。

 

原文地址:https://www.cnblogs.com/lelun/p/5640612.html