CircleImage - Tai-Kimura/SwiftJsonUI GitHub Wiki

CircleImage

class: CircleImageView inherites: [NetworkImageView](/Tai-Kimura/SwiftJsonUI/wiki/NetworkImage)

Platform Support

  • UIKit: Full support (All attributes available)
  • SwiftUI: Full support (Maps to AsyncImage with circle clip shape)

Attributes for CircleImage

attribute name UIKit SwiftUI type in json details remarks
src string URL string for remote image or local image name
defaultImage string Default image name to display initially
errorImage string Image to show when download fails
loadingImage string Image to show while downloading
contentMode string Content mode: AspectFill (default), AspectFit, Center
borderWidth float Border width for circle
borderColor string Border color for circle
All NetworkImage attributes - Inherits all attributes from NetworkImage See NetworkImage

Functions for CircleImage

public class func createFromJSON(attr: JSON, target: Any, views: inout [String: UIView]) -> CircleImageView

This method will be called when it's created from json file. Override This method when you create classes inherite CircleImageView class.