An easy way to show Local, Remote and System images with SwiftUI

SwiftUImage

An easy way to show Local, Remote and System images with SwiftUI.

Environment

  • Xcode 13 or above
  • iOS 15 or above
  • macOS 12 or above
  • watchOS 8 or above

Usage

import SwiftUImage

SF System Symbols (Start with sf.)

// SwiftUImage(name: .constant("sf.{STRING}"))
SwiftUImage(name: .constant("sf.globe"))

Expected Output:

Remote Image (Start with http)

// SwiftUImage(name: .constant("{URL_STRING}"))
SwiftUImage(name: .constant("https://developer.apple.com/news/images/og/swiftui-og.png"))

Expected Output:

Local Image (Inside Assets Folder)

// SwiftUImage(name: .constant("{STRING}"))
SwiftUImage(name: .constant("applelogo"))

Expected Output:

Contribution

Please raise an issue / pull request.

GitHub

View Github