ChenYilong / CYLTabBarController

[EN]It is an iOS UI module library for adding animation to iOS tabbar items and icons with Lottie, and adding a bigger center UITabBar Item. [CN]【中国特色 TabBar】一行代码实现 Lottie 动画TabBar,支持中间带+号的TabBar样式,自带红点角标,支持动态刷新。【iOS13 & Dark Mode & iPhone XS MAX supported】
MIT License
6.91k stars 1.45k forks source link

tabBarItems 加载网络图片问题 #145

Closed iOSGL closed 5 years ago

iOSGL commented 7 years ago

请问一下加载网络图片,有没有一个设置图片大小的属性,比如说图片是48 48像素,在我们程序中size 应该是 24 24,但是不做任何处理的话,图片的宽高就直接按照像素来显示了。

ChenYilong commented 7 years ago

目前v1.13.0做不到,后续版本打算支持下。

ZYCFan commented 7 years ago

@ChenYilong 这个问题解决了吗?

iOSGL commented 7 years ago

UIImage *image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:pathForEnvironment(item.imageUrl)]] scale:2];我们现在是先下载到本地在给赋上去的。

2017-08-03 13:41 GMT+08:00 ZYCFan notifications@github.com:

@ChenYilong https://github.com/chenyilong 这个问题解决了吗?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ChenYilong/CYLTabBarController/issues/145#issuecomment-319873287, or mute the thread https://github.com/notifications/unsubscribe-auth/AITOrQBCYbbovFtJpCUJWUbvSQNWFa2nks5sUV2AgaJpZM4NmKdl .

ZYCFan commented 7 years ago

@geng199200 我也想过这么用,觉得有点麻烦。还是直接用UIButton+SDWebImage了。