UIImageView的图片居中问题
2015-12-09 20:21 jiangys 阅读(833) 评论(0) 收藏 举报
UIImageView *iconImageView = [[UIImageView alloc] initWithFrame:CGRectMake((SCREEN_WIDTH - 60) * 0.5, 75, 60, 60)]; iconImageView.image = [UIImage imageNamed:@"login_default_header_icon"]; iconImageView.backgroundColor = [UIColor yellowColor]; iconImageView.contentMode = UIViewContentModeScaleAspectFill; iconImageView.layer.masksToBounds = YES; iconImageView.layer.cornerRadius = iconImageView.size.width * 0.5; [self.view addSubview:iconImageView];
http://blog.csdn.net/zhoutao198712/article/details/8762012