SFUserFriendlySymbols - This is user-friendly SF Symbols

Overview

SFUserFriendlySymbols

SFUserFriendlySymbols

This is USER-FRIENDLY SF Symbols.

You can use SF Symbols image without coding system names and if you select unavailable system image, you know it with the alert from Xcode.

⬇️ Installation

Swift Package Manager(Recommended)

on Xcode, choose FileAdd Packages... → type url: https://github.com/littleossa/SFUserFriendlySymbols.git in the searchbox. searchbox

tap Add Package if SFUserFriendlySymbols package appears.

You can also add this package to Package.swift, include it in your target dependencies.

let package = Package(
    dependencies: [
        .package(url: "https://github.com/littleossa/SFUserFriendlySymbols", .upToNextMajor(from: "0.1.1")),
    ],
    targets: [
        .target(
            name: "<your-target-name>",
            dependencies: ["SFUserFriendlySymbols"]),
    ]
)

📖 How to use

At first, import SFUserFriendlySymbols.

◆ UIKit

for example, if you want use this system symbol named face.smiling

face-smiling

symbol names changed into lower camel cases in SFUserFriendlySymbols.

face.smiling -> faceSmiling

select lower camel cased symbols as the parameter in the initializer.

let image = UIImage(symbol: .faceSmiling)

unfortunately,there are some symbol names which start with numbers.

1Circle

the example is 1.circle.in this case,the enum case start with _.

let image = UIImage(symbol: ._1Circle)

◆ SwiftUI

Image(symbol: .faceSmiling)

Why UserFriendly?

Why this name of SF Symbols library includes UserFriendly?

The symbol can't use and you can know with the alert on Xcode when your lower OS target version doesn't reach available version of the given symbol.

sfsymbols-alert

And also, you don't need to type system name when you intialize images with any symbols.

There is just one word. "Happy"

🆕 Features from iOS 15

You can set image palette-colored or hiralical-colored, muluticolored.

use this symbol "pc" as a sample this time.

pc

palette-colored

let image = UIImage(symbol: .pc, paletteColors: [.systemPink, .yellow])

palette-color

hierarchical-colored

let image = UIImage(symbol: .pc, hierarchicalColor: .systemPink)

hierirchcal-color

multicolored

if symbols have multicolor variant, the symbol's color prefers the multicolor when they initialize with UIImage(multiColoredSymbol:)

let image = UIImage(multiColoredSymbol: .pc)

multicolor

💡 Contribution

Feel free to contribute from SF Symbols lovers.

License

This library is released under the MIT License.

You might also like...
Weather forecast app that allows the user to either look for weather at their current location based on the GPS data or search for another city manually.
Weather forecast app that allows the user to either look for weather at their current location based on the GPS data or search for another city manually.

⛅️ Cloudy Weather forecast app that allows the user to either look for weather at their current location based on the GPS data or search for another c

Conveniently getting the User Agent through WKWebView

WebKit User Agent Requirements iOS 9.0+ macOS 10.11+ Installation See the subsec

MovieAppSwiftUI - The Application is using TMDB API and Server API to reduce user searching movies resources time with search engine
MovieAppSwiftUI - The Application is using TMDB API and Server API to reduce user searching movies resources time with search engine

MovieAppSwiftUI The Application is using TMDB API and Server API to reduce user searching movies resources time with search engine.This Application is

Stocks-App - App that allows the user to track stocks of their choice
Stocks-App - App that allows the user to track stocks of their choice

Stocks-App App that allows the user to track stocks of their choice (Coming soon

Introducing SwiftUI. A declarative way to create User Interfaces with Swift.

SwiftUI - Landmarks Introducing SwiftUI. A declarative way to create User Interfaces with Swift. SwiftUI was introduced at WWDC 2019 by Apple. It is t

An iOS app that lets user quickly jot down thoughts with Markdown support
An iOS app that lets user quickly jot down thoughts with Markdown support

Thoughtless An iOS app that lets user quickly jot down thoughts with Markdown support. Description Perhaps you are often in a situation where you want

IMC - App developed to show the user's BMI
IMC - App developed to show the user's BMI

IMC Swift Aplicativo que o usuário digita seu peso e sua idade e tem como result

GitHub-User is an iOS native application, written in Swift programming language.
GitHub-User is an iOS native application, written in Swift programming language.

#GitHub-User GitHub-User is an iOS native application, written in Swift programming language. This project is an interview take home project. The arch

Get location of user and show near cities and weather of the cities for next 6 days. (iOS)

technical-assignment-Weather-App This project written in Swift by Emre Kılınc You need to have Xcode installed. Please open weather_app.xcworkspace wi

Comments
  • Update as the version 0.2.1

    Update as the version 0.2.1

    Added

    • added the comments of all properties on SFSymbols+allCases.

    Modified

    • modified two comments of test methods on SFUserFriendlySymbolsTests.
    • update version number written in README file.
      • 0.2.0 -> 0.2.1
    opened by littleossa 0
Releases(0.4.0)
  • 0.4.0(Apr 25, 2022)

  • 0.3.1(Mar 24, 2022)

  • 0.3.0(Mar 23, 2022)

  • 0.2.2(Jan 30, 2022)

  • 0.2.1(Jan 29, 2022)

    Added

    • added the comments of all properties on SFSymbols+allCases.

    Modified

    • modified two comments of test methods on SFUserFriendlySymbolsTests.
    • update version number written in README file.
      • 0.2.0 -> 0.2.1

    Rock'n'roll!

    Source code(tar.gz)
    Source code(zip)
  • 0.2.0(Jan 29, 2022)

    Add

    • SFSymbols.allCases
    • Tests SFSymbols' all cases test and each initializers tests

    I don't thinks most of developers need all cases but I really wanted it.

    Have a nice day with all symbols!

    Source code(tar.gz)
    Source code(zip)
  • 0.1.1(Jan 27, 2022)

  • 0.1.0(Jan 26, 2022)

Owner
Lil Ossa リルオッサ
I am a break dancer (B-boy) but not an iOS developer.
Lil Ossa リルオッサ
SwiftUI app to search and showcase SF Symbols 🔎

SF Symbols (SwiftUI 2.0 App) Experimenting with SwiftUI 2.0 whilst creating a practical app to browse the SF Symbols via an iOS/iPadOS app. ????‍⚖️ Di

An Trinh 104 Dec 25, 2022
Set of available SF Symbols

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

Michael Abadi Santoso 54 Jan 3, 2023
A Safari extension that redirects Twitter, YouTube, Reddit, and more to privacy friendly alternatives.

Privacy Redirect for Safari A configurable web extension that redirects Twitter, YouTube, Reddit, Google Maps, Google Search, and Google Translate to

null 101 Dec 16, 2022
An iOS app that generates random activities for the user to do. And can be personalized by setting the categories.

RandomActivityApp An iOS app that generates random activities for the user to do. And can be personalized by setting the categories. Created by: Pedro

Pedro Esli 2 Jul 4, 2022
A mobile application that presents the news received via NewsAPI to the user. Built with SwiftUI.

?? SwiftUI News App with NewsAPI A mobile application that presents the news received via NewsAPI to the user. Built with SwiftUI. ✅ Features The data

Doğancan Mavideniz 5 Nov 15, 2021
Seaglass is a truly native macOS client for Matrix. It is written in Swift and uses the Cocoa user interface framework.

Seaglass is a truly native macOS client for Matrix. It is written in Swift and uses the Cocoa user interface framework.

null 1 Jan 17, 2022
A Meetings app where the user is presented with the number of meetings created , join any them , edit the varied details also keeping the track of the history of the meetings.

Meetings A Meetings app where the user is presented with the number of meetings created , join any them , edit the varied details also keeping the tra

Devang Papinwar 1 Oct 18, 2021
‪‪An app that stores and displays the information entered by the user‬‬

To do list :‬‬ ‪‪An app that stores and displays the information entered by the user‬‬ ‪‪The user can : Add, delete one or clear all , Edit, Show the

null 0 Nov 4, 2021
iOS App by which the user can display a list of characters from the Harry Potter Movies.

iOS App by which the user can display a list of characters from the Harry Potter Movies. They can display a list of all characters, students, staff or view characters by house.

Matthew Hollyhead 0 Nov 7, 2021
An App that gives a nice interface where the user can type in their start location and destination

SixtCarSummoner What it does We developed an App that gives a nice interface where the user can type in their start location and destination. The user

Dominik Schiwietz 1 Nov 21, 2021