SwiftUImage

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

CleanShot 2022-08-15 at 22 30 18@2x

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:

CleanShot 2022-08-15 at 22 31 43@2x

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:

CleanShot 2022-08-15 at 22 31 58@2x

Local Image (Inside Assets Folder)

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

Expected Output:

CleanShot 2022-08-15 at 22 32 12@2x

Contribution

Please raise an issue / pull request.

GitHub

View Github