SFSymbolsFinder

1.0.0

Set of available SF Symbols
abadikaka/SFSymbolsFinder

What's New

First Complete SF Icon Released, with major support on all OS

2021-01-03T07:20:20Z
  • all category with supported all icons
  • support on all OS

Swift Package Manager MacOS + iOS + iPadOS + tvOS + watchOS Twitter: @michaelabadiii

SFSymbolsFinder

SFSymbolsFinder is a convenient library to get whole list of available latest SF Symbols image

Introduction

SFSymbolsFinder introduces 21 SF Symbols categories, each category represented by an enum:

  • General
  • Communication
  • Weather
  • ObjectsAndTools
  • Devices
  • Connectivity
  • Transportation
  • Human
  • Nature
  • Editing
  • Text Formatting
  • Media
  • Keyboard
  • Commerce
  • Time
  • Health
  • Shapes
  • Arrows
  • Indices
  • Math
  • Gaming
  • Multicolor

All categories is based on official Apple SF Symbols application sfsymbols

FYI: Most of the symbols is coming from SF Symbols v 1.1 for now. Soon will adding more to support v 2.1. Contribution welcome !

Usage

General Usage

Use it easily with calling the enum for each category

import SFSymbolsFinder
import SwiftUI

struct ContentView: View {
  var body: some View {
    VLayout {
        // Approach 1 by using Image directly
        VLayout {
            Communication.micSlashFill.image
                                .resizable()
        }
        // Approach 2 by using the system name string
        VLayout {
            Image(systemName: Communication.micSlashFill.systemName)
                                .resizable()
        }
    }
  }
}

There are some categories that need special way to retrieve the symbols:

ObjectAndTools

For one of the icon which is oneMagnifyingglass is used for getting 1.magnifyingglass system name

Indices

For indices there are special ways to get 3 special symbols which is for retrieving Currency, Alphabet, and Number.

  • For number, it supports generic type
// With Int
Indices.Number.circle(number: 1).systemName
// With String
Indices.Number.circle(number: "01").systemName

Please beware not every number or string is supported, in case we put 999 or "-123" it won't return anything.

  • For Alphabet, it supports by passing Character enum. It supports a to z.
Indices.Alphabet.circle(character: .a).systemName // return a.circle
  • For Currency, it supports by passing AvailableCurrency enum.
Indices.Currency.circle(currency: .dollar).systemName // return dollarsign.circle

Installation

SFSymbolsFinder is distributed using the Swift Package Manager. To install it into a project, follow this tutorial and use this repository URL: https://github.com/abadikaka/SFSymbolsFinder.git.

Credits

SFSymbolsFinder was built by Michael Abadi S. as a component of some of his project described in his website.

Contributions and Support

All users are welcome and encouraged to become active participants in the project continued development — by fixing any bug that they encounter, or by improving the documentation wherever it’s found to be lacking, and adding more or missing available SF Symbols, or even only adding a Unit Test.

If you'd like to make a change, please open a Pull Request, even if it just contains a draft of the changes you’re planning, or a test that reproduces an issue.

If you'd like to open an issue, please submit new issue.

Todo

  • Add generic validation for system name
  • Add more iOS 14 symbols
  • Add more iOS 13 symbols that not included in any Categories

Thank you and please enjoy using SFSymbolsFinder!

Description

  • Swift Tools 5.1.0

Dependencies

  • None
Last updated: Tue Jan 12 2021 10:33:35 GMT-0500 (GMT-05:00)