博主使用IOS开发框架:SWIFTUI
 
 
安装方式:

CocoaPods

 
 pod 'Kingfisher/SwiftUI'
 
 
SwiftUI support is provided in a sub-spec. So instead of specifying pod 'Kingfisher', you need pod 'Kingfisher/SwiftUI'.
 
Swift文件中加载方法:
import struct Kingfisher.KFImage
// If you are using CocoaPods, in which the SwiftUI support is defined in the same module.import struct Kingfisher.KFImage
 
 
简单使用方法:
IOS加载网络图片(Kingfisher)
 
如果要加载Http的图片,需要进行如下修改:
选择工程中的TARGETS->Info,添加AppTransportSecurity类型Dictionary。在AppTransportSecurity下添加AllowsArbitraryLoads类型Boolean, 值设为YES。
IOS加载网络图片(Kingfisher)
 
 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
  • 2021-07-08
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-31
  • 2022-12-23
  • 2022-12-23
  • 2021-05-08
  • 2022-12-23
  • 2021-12-10
相关资源
相似解决方案