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

相关文章:

  • 2021-12-13
  • 2021-05-16
  • 2021-11-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-11
猜你喜欢
  • 2022-12-23
  • 2021-04-16
  • 2022-12-23
  • 2022-12-23
  • 2021-12-07
  • 2022-12-23
相关资源
相似解决方案