Thursday, August 25, 2011

iPhone Find CGRect Width and Height

If we are given a rectangle as following , we can find the width by using function given in iPhone SDK

   CGRect b=CGRectMake(4050240150);
  float width=CGRectGetWidth(b);
  float height=CGRectGetHeight(b);

It will return width = 240 and height = 150.

If this is not what you were looking for CGRect, try this comprehensive LIST.