Comments (2)
@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的关注!谢谢!
from interviewguide.
明白了,谢谢楼主
from interviewguide.
Related Issues (15)
- 请问频道列表是哪个接口? HOT 1
- java知识点 HOT 1
- 单例模式里面第一版DCL代码中的注释不太对 HOT 3
- 看不到hashMap的图 HOT 1
- github.io站点访问不了啦 HOT 2
- Linux内核学习资料
- mysql篇中更新时普通索引需要判断唯一性应该是唯一索引吧
- Redis过期key是怎么样清理的?中LRU算法 PS部分表述问题
- 楼主,我可以参与你这个开源项目或者我down一份自己按照自己的需求扩充一份吗? HOT 1
- 问题 HOT 2
- 没有按需加载 HOT 1
- 无法下载 HOT 1
- 选择菜单没有效果 HOT 3
- 不错 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from interviewguide.