Skip to content
New issue

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

在iPhone6上的网格布局可以修改吗? #1

Open
xhzengAIB opened this issue Jan 29, 2015 · 5 comments
Open

在iPhone6上的网格布局可以修改吗? #1

xhzengAIB opened this issue Jan 29, 2015 · 5 comments

Comments

@xhzengAIB
Copy link

Hi! @TigerWf

比如说:一张图片的时候不是格子(自适应的单张图片),四张图片的时候(四宫格,而不是九宫格的四个布局),这样和微信就一样了。

Jack

@TigerWf
Copy link
Owner

TigerWf commented Jan 29, 2015

当时写这代码的时候,关注点不是在图片这块哦。如果按你说的这样,那还得在自定义的cell里去根据图片的数量来判断排列方式,貌似好麻烦。。(经常看到你在开源社区发码哈。。^_^)

@xhzengAIB
Copy link
Author

没关系!我只是问问,如果可以做到这点的话,还是挺好用的

@lennondong
Copy link

还有个问题,就是如果图片不是方的,显示出来依然是方的,这样图片就会被压扁了。应该增加一个图片比例适配。

@TigerWf
Copy link
Owner

TigerWf commented Jul 21, 2015

@lennondong 设置UIImageView的contentMode属性为UIViewContentModeScaleAspectFill 让它自动剪切 就不会压扁了, 至于若要真的做成和朋友圈那样 得根据图片数量来判断 而且图片的尺寸服务器那边带过来最好。

@lennondong
Copy link

@TigerWf 好,我试试。有问题和想法再和你沟通。感谢回复!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants