iOS开发Tips4

  • 修改cell.imageView.frame大小
  • UIView旋转
  • Objective-C中的Literals
  • 打印Rect, Size, Point

---------------------------------------------------------------------

修改cell.imageView.frame大小

The best way is to add - (void)layoutSubviews to your cell subclass like this:

- (void)layoutSubviews {
    [super layoutSubviews];
    self.imageView.frame = CGRectMake(0.0f , 0.0f, 32.0f, 32.0f);
}


---------------------------------------------------------------------
UIView旋转

float rotateAngle = M_PI;    
 CGAffineTransform transform =CGAffineTransformMakeRotation(rotateAngle);    
 view.transform = transform;  



---------------------------------------------------------------------
Objective-C中的Literals
http://beyondvincent.com/blog/2014/01/23/guided-tour-through-objective-c-literals/

---------------------------------------------------------------------

打印Rect, Size, Point

    NSLog(@"%@", NSStringFromCGRect(rect));
    NSLog(@"%@", NSStringFromCGSize(size));
    NSLog(@"%@", NSStringFromCGPoint(point));

你可能感兴趣的:(UIView旋转,打印Rect,SizePoint)