uiimageview 读取uiimage的大小

来源:互联网 发布:淘宝大v 编辑:程序博客网 时间:2024/05/14 14:17
UIImage* image = [UIImage imageNamed:@"image.png"];

   UIImageView* imageView = [[[UIImageView alloc] initWithImage:image] autorelease];

   imageView.frame = CGRectMake(0, 0, 300, 200);

   imageView.layer.cornerRadius = 8;  
   imageView.layer.masksToBounds = YES;

///显示图片大小
    imageView1.contentMode = UIViewContentModeCenter;

0 0
原创粉丝点击