Skip to content

0.3版本 image扩展

Compare
Choose a tag to compare
@BestYun BestYun released this 03 Nov 02:10
· 16 commits to main since this release
  • 增加了百分比功能
  • 增加ImageView SDWebImage扩展
    • 安装:pod "FlexBoxUIKit/SDWebImage"
  • 增加ImageView Kingfisher扩展,注意:此库需要ios12以上
    • 安装:pod "FlexBoxUIKit/Kingfisher"

注意

SDWebImage和Kingfisher二选一即可
用法:
@ UState var imgUrl = "https://upload-images.jianshu.io/upload_images/5809200-a99419bb94924e6d.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240"
ImageView(url: $imgUrl).size(100).backgroundColor(.orange).margin(.vertical,10)
或者
ImageView(url: "https://example.com/xx.png").size(100).backgroundColor(.orange).margin(.vertical,10)