ImageView
public struct ImageView : UIViewRepresentable
图片视图,支持网络图片和动图
-
指定本地占位图片初始化
Declaration
Swift
public init(_ placeholder: UIImage? = nil)
-
指定网络图片URL初始化
Declaration
Swift
public init(url: URLParameter?)
-
设置网络图片URL
Declaration
Swift
public func url(_ url: URLParameter?) -> ImageView
-
设置网络图片加载选项
Declaration
Swift
public func options(_ options: WebImageOptions) -> ImageView
-
设置本地占位图片
Declaration
Swift
public func placeholder(_ placeholder: UIImage?) -> ImageView
-
设置图片显示内容模式,默认scaleAspectFill
Declaration
Swift
public func contentMode(_ contentMode: UIView.ContentMode) -> ImageView
-
Declaration
Swift
public typealias UIViewType = ResizableView<UIImageView>
-
Declaration
Swift
public func makeUIView(context: Context) -> ResizableView<UIImageView>
-
Declaration
Swift
public func updateUIView(_ uiView: ResizableView<UIImageView>, context: Context)
-
Declaration
Swift
public static func dismantleUIView(_ uiView: ResizableView<UIImageView>, coordinator: ())