UIImage

作者: 纯阳子_ | 来源:发表于2017-08-14 16:20 被阅读15次
 //设置imageView不变形

 [imageView setContentScaleFactor:[[UIScreen mainScreen] scale]];

 imageView.contentMode =  UIViewContentModeScaleAspectFill;

 imageView.autoresizingMask = UIViewAutoresizingFlexibleHeight;

 imageView.clipsToBounds  = YES;

UIImageOrientation

 typedef NS_ENUM(NSInteger, UIImageOrientation) {

     UIImageOrientationUp,            // 默认方向

     UIImageOrientationDown,          // 180度旋转

     UIImageOrientationLeft,          // 90 deg CCW   逆时针旋转90

     UIImageOrientationRight,        // 90 deg CW  顺时针旋转90

     UIImageOrientationUpMirrored,    // 向上水平翻转

     UIImageOrientationDownMirrored,  // 向下水平翻转

     UIImageOrientationLeftMirrored,  // 逆时针旋转90, 垂直翻转

     UIImageOrientationRightMirrored, // 顺时针旋转90,垂直翻转

 };

UIImageResizingMode

 typedef NS_ENUM(NSInteger, UIImageResizingMode) {

     UIImageResizingModeTile,//图像缩放模式

     UIImageResizingModeStretch,//图像模式延展

};

相关文章

网友评论

      本文标题:UIImage

      本文链接:https://www.haomeiwen.com/subject/fzburxtx.html