We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
楼主,你的项目很棒,向你请教一个问题,这里面的图片显示你是怎么处理的呢?比如遇到不规则的图片,那几种显示图片的方式并不能完全满足要求,如果进行裁剪,图片就会变模糊.你是怎么处理的呢?
The text was updated successfully, but these errors were encountered:
@mrhyh 您好!感谢您关注这个项目,不知道您说的是哪里的图片显示,如果是指图片模块中的每个cell中的搞笑图片,我是依据原图的宽高比来计算imageView的宽和高(宽是固定的,是屏幕的宽度,高是根据宽高比计算所得) 1.如果计算得到的高度在正常范围内(小于[UIScreen mainScreen].bounds.size.height-64-40) 那么会显示图片的全部,将imageView的contentMode设置为 UIViewContentModeScaleToFill;
2.如果计算得到的高度非常大(大于[UIScreen mainScreen].bounds.size.height-64-40) 如果计算的高度超出一定值,那么只会显示图片的中间部分,不需要裁剪和绘制,只需将imageView的contentMode设置为UIViewContentModeScaleAspectFill; 并且在imageView下方会有一个查看大图的按钮。
感谢您对TTNew的关注!谢谢!
Sorry, something went wrong.
明白了,谢谢楼主
GitBook: [NotFound9#2] No subject
8eb0a3c
No branches or pull requests
楼主,你的项目很棒,向你请教一个问题,这里面的图片显示你是怎么处理的呢?比如遇到不规则的图片,那几种显示图片的方式并不能完全满足要求,如果进行裁剪,图片就会变模糊.你是怎么处理的呢?
The text was updated successfully, but these errors were encountered: