uiimage缩放图片大小和属性UIViewContentModeScaleAspectFit

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

 

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

posted @ 2013-12-25 16:25  如来藏  阅读(1572)  评论(0编辑  收藏  举报