Skip to content

EasyPackages/EasySymbol

Repository files navigation

Banner

Swift

A lightweight Swift enum for using SF Symbols in a type-safe way.
No more strings — just autocomplete-friendly, raw value–based access to SF Symbols.

Features

  • 🔤 Type-safe access to SF Symbols
  • 🧭 Easy autocomplete
  • 🧱 No nested enums — flat and simple

Examples

let symbolName = Symbol.xmark.rawValue

// SwiftUI
Symbol.xmark.image
    .resizable()
    .scaledToFit()

// UIKit
let uiKitImage = Symbol.xmark.imageView

Installation

Simply add a package to your project passing in https://github.com/EasyPackages/EasySymbol.

In your dependency you can add this in your Package.swift:

dependencies: [
    .package(
        url: "https://github.com/EasyPackages/EasySymbol.git",
        from: "1.0.0"
    )
]

In your target

.target(
    name: "YourApp",
    dependencies: ["EasyMock"]
)

Tests

Unit tests are written using the new Swift Testing framework (Swift 5.9+).
You can find them in the SymbolTests... files, grouped for performance.

About

Type-safe and autocomplete-friendly SF Symbols in Swift

Topics

Resources

Stars

Watchers

Forks

Languages