title: what does bounds really mean in CALayer?
body: <p>I was confused about the property bounds of CALayer,</p>
  
  <pre><code> - (void)viewDidLoad {
      [super viewDidLoad];
  
      CALayer *sublayer = [CALayer layer];
      sublayer.backgroundColor = [UIColor blueColor].CGColor;
      sublayer.frame = CGRectMake(18, 18, 154, 154);
      [self.view.layer addSublayer:sublayer];
  
      CALayer *sublayer2 = [CALayer layer];
      sublayer2.backgroundColor = [UIColor redColor].CGColor;
      sublayer2.frame = CGRectMake(20, 20, 150, 150);
      sublayer2.bounds = CGRectMake(0, 0, 50, 50);
      sublayer2.zPosition = 10;
  
      [self.view.layer addSublayer:sublayer2];
  }
  </code></pre>
  
  <p>sublayer2 draw a small 50X50 rectangle in the center of the rectangle of sublayer1,
  but it will draw a 150X150 rectangle if this line is commented out:</p>
  
  <pre><code>sublayer2.bounds = CGRectMake(0, 0, 50, 50);
  </code></pre>