所有SFSymbols(1.1和2.0)触手可及

SFSymbol:SFSymbol和SFSymbol 2

构建状态 斯威夫特 5.3 兼容 Swift Package Manager 兼容可可豆荚 迦太基兼容 许可证

所有 SFSymbols 触手可及(SFSymbol 1.1 和 2)

用法

SFSymbol并且是一个 S,其中包含所有 Apple 的 和 的标识符字符串。SFSymbol2enumSFSymbolSFSymbol2

例如,生成 然后可用于通过以下方式实例化系统符号:SFSymbol.playCircleString"play.circle"

UIKit

    UIImage(symbol: .playCircle)

迅捷用户界面

    Image(symbol: .playCircle)

大约

SFSymbols(1.1和2)是苹果的真正享受,苹果的官方符号列表,在苹果最近的任何平台上编写软件时都可以免费使用。但是,有一个缺点,查找确切的符号名称是脖子上的痛苦,例如:

"square.and.line.vertical.and.square.fill"

That is a long string to remember and digging through the catalog of SF Symbols to find in would be quite a waste of time.

Wouldn’t it be easier if you could just use code completion?

Thats what this super micro library aims to do.

Installation

Swift Package Manager (Preferred)

Since Xcode integrated swift package manager natively into the IDE you can add SFSymbol simply by:

File-> Swift Packages -> Add Package Dependency...

when prompted to enter a package URL paste:

https://github.com/Nirma/SFSymbol

and click next & finish to automagically install SFSymbol through Xcode & SPM!

Manual

Don’t want that additional third party dependency? Then just simply copy over the file SFSymbol.swift into your project’s appropriate folder!

Cocoapods

Just add this line to your podfile:

pod 'SFSymbol'

Carthage

github "Nirma/SFSymbol"

Contributing to this project

Contributions are highly welcome

If there is something you wish to fix about the project, or wish to add any other kind of enhancements, propose to add to the project. Please feel free to send over a pull request or open an issue for this project.

License

SFSymbol is released under the MIT license. See LICENSE for details.

GitHub

https://github.com/Nirma/SFSymbol