UIImageView的图片居中问题

    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

原文地址:https://www.cnblogs.com/jys509/p/5034095.html