UIImageView *tmp = [[UIImageView alloc]initWithFrame:CGRectMake(5.0f, 5.0f, 40.0f, 40.0f)];
                    tmp.image = self.friendRecord.appIcon;
                    [tmp setContentMode:UIViewContentModeScaleAspectFit];

 

按照一定比例缩放图片后需要注意使用UIViewContentModeScaleAspectFit才可以正常显示否则总是铺满全屏显示的

相关文章:

  • 2021-10-13
  • 2021-07-08
  • 2021-08-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-23
  • 2022-01-17
  • 2021-11-22
  • 2022-12-23
  • 2021-06-04
  • 2021-06-17
相关资源
相似解决方案