SFSafeSymbols alternatives and similar libraries
Based on the "Image" category.
Alternatively, view SFSafeSymbols alternatives based on common mentions on social networks and blogs.
-
SDWebImage
Asynchronous image downloader with cache support as a UIImageView category -
GPU Image
An open source iOS framework for GPU-based image and video processing -
Kingfisher
A lightweight, pure-Swift library for downloading and caching images from the web. -
MWPhotoBrowser
A simple iOS photo and video browser with grid view, captions and selections. -
FastImageCache
iOS library for quickly displaying images while scrolling -
GPUImage2
GPUImage 2 is a BSD-licensed Swift framework for GPU-accelerated video and image processing. -
TOCropViewController
A view controller for iOS that allows users to crop portions of UIImage objects -
AlamofireImage
AlamofireImage is an image component library for Alamofire -
PINRemoteImage
A thread safe, performant, feature rich image fetcher -
IDMPhotoBrowser
Photo Browser / Viewer inspired by Facebook's and Tweetbot's with ARC support, swipe-to-dismiss, image progress and more -
NYTPhotoViewer
A modern photo viewing experience for iOS. -
AspectFillFaceAware
An extension that gives UIImageView the ability to focus on faces within an image. -
UIImageColors
Fetches the most dominant and prominent colors from an image. -
SKPhotoBrowser
Simple PhotoBrowser/Viewer inspired by facebook, twitter photo browsers written by swift -
RSKImageCropper
An image cropper / photo cropper for iOS like in the Contacts app with support for landscape orientation. -
GPUImage3
GPUImage 3 is a BSD-licensed Swift framework for GPU-accelerated video and image processing using Metal. -
ImageSlideshow
Swift image slideshow with circular scrolling, timer and full screen viewer -
TLPhotoPicker
📷 multiple phassets picker for iOS lib. like a facebook -
EBPhotoPages
A photo gallery for iOS with a modern feature set. Similar features as the Facebook photo browser. -
Lightbox
:milky_way: A convenient and easy to use image viewer for your iOS app -
TinyCrayon
A smart and easy-to-use image masking and cutout SDK for mobile apps. -
Twitter Image Pipline
Twitter Image Pipeline is a robust and performant image loading and caching framework for iOS clients -
Sharaku
(Not maintained)Image filtering UI library like Instagram. -
ImagePickerSheetController
ImagePickerSheetController replicates the custom photo action sheet in iMessage. -
MetalPetal
A GPU accelerated image and video processing framework built on Metal. -
YUCIHighPassSkinSmoothing
An implementation of High Pass Skin Smoothing using Apple's Core Image Framework -
DFImageManager
Image loading, processing, caching and preheating -
CTPanoramaView
A library that displays spherical or cylindrical panoramas with touch or motion based controls. -
ImageScout
A Swift implementation of fastimage. Supports PNG, GIF, and JPEG. -
Paparazzo
Custom iOS camera and photo picker with editing capabilities -
ShadowImageView
A apple music cover picture shadow style image library -
OnlyPictures
A simple and flexible way to add source of overlapping circular pictures, currently supports horizontal overlapping or distant pictures with great layout flexibility. -
ComplimentaryGradientView
Create complementary gradients generated from dominant and prominent colors in supplied image. Inspired by Grade.js -
AXPhotoViewer
An iOS/tvOS photo gallery viewer, useful for viewing a large (or small!) number of photos. -
Imaginary
:unicorn: Remote images, as easy as one, two, three. -
SimpleImageViewer
A snappy image viewer with zoom and interactive dismissal transition. -
Viewer
Image viewer (or Lightbox) with support for local and remote videos and images -
SABlurImageView
You can use blur effect and it's animation easily to call only two methods.
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of SFSafeSymbols or a related project?
README
Idea & Features • Supported Versions • Installation • Usage • Contributing • License • Issues • Pull Requests
Idea & Features
At WWDC 2019, Apple announced a new library of icons that came included with that year's new operating system versions. To browse them, there's a dedicated Mac app called SF Symbols. However, developers still have to copy the name of a symbol and reference it unsafely, resulting in code like this:
UIImage(systemName: "circle.fill")
It didn't take long until first ideas came up to make these icons accessible in a safe way using a framework. And this is just the basic idea behind SFSafeSymbols
!
Furthermore, with SFSafeSymbols
...
- ... you can be sure your symbol code won't crash due to typos or symbol availability issues. This is because all symbols are tested via a CI (on the latest iOS & tvOS versions and also some earlier OS versions).
- ... lookups in the SF Symbols app (e. g. about available layersets, available localizations & the look of the symbol) are no longer needed because every symbol is documented in code.
- ... multiple SF Symbols versions are supported at the same time (via utilization of the
@availability
flag). Each symbol is only made available on those platform versions where Apple says it's available. - ... renamed symbols can be detected easily (via a deprecation notice which suggests the use of the new name at the same time).
Supported Versions
The following SF Symbols versions are currently supported:
SF Symbols Version | iOS Version | macOS Version | tvOS Version | watchOS Version |
---|---|---|---|---|
1.0 | 13.0 | 11.0 | 13.0 | 6.0 |
1.1 | 13.1 | 11.0 | 13.0 | 6.1 |
2.0 | 14.0 | 11.0 | 14.0 | 7.0 |
2.1 | 14.2 | 11.0 | 14.2 | 7.1 |
2.2 | 14.5 | 11.3 | 14.5 | 7.4 |
3.0 | 15.0 | 12.0 | 15.0 | 8.0 |
3.1 | 15.1 | 12.0 | 15.1 | 8.1 |
3.2 | 15.2 | 12.1 | 15.2 | 8.3 |
3.3 | 15.4 | 12.3 | 15.4 | 8.5 |
Installation
SFSafeSymbols
can be installed via the Swift Package Manager (recommended), Carthage or CocoaPods.
Supported platforms are iOS (11.0+)
, macOS (10.13+)
, tvOS (11.0+)
and watchOS (4.0+)
, although the actual functionality is of course only accessible starting with iOS 13.0
, macOS 11.0
, tvOS 13.0
and watchOS 6.0
.
Swift Package Manager (Xcode-integrated)
To integrate SFSafeSymbols using the Xcode-built-in SPM, choose File
→ Swift Packages
→ Add Package Dependency
. Enter the following url: https://github.com/SFSafeSymbols/SFSafeSymbols
and click Next
. When asked about the version, leave the preselection and click Next
. In the following step, select SFSafeSymbols
as the package product and click Finish
.
Swift Package Manager (standalone)
To integrate using the standalone version of Apple's Swift Package Manager, add the following as a dependency to your Package.swift
:
.package(url: "https://github.com/SFSafeSymbols/SFSafeSymbols.git", .upToNextMajor(from: "3.3.2"))
After specifying "SFSafeSymbols"
as a dependency of the target in which you want to use it, run swift package update
.
Carthage
Add the following entry to your Cartfile:
github "SFSafeSymbols/SFSafeSymbols" ~> 3.3.2
Then run carthage update
.
CocoaPods
Add the following entry to your Podfile:
pod 'SFSafeSymbols', '~> 3.3.2'
Then run pod install
.
Usage
All the system symbols are accessible via the SFSymbol
type. They are named similar to Apple's names, but use a lower camel case style and prefix names with leading numbers with a _
character:
c.circle ~> SFSymbol.cCircle
e.circle.fill ~> SFSymbol.eCircleFill
11.circle.fill ~> SFSymbol._11CircleFill
A SF Symbol UIImage
can now be initialized using the SFSymbol
type. This image is already unwrapped, so you get a UIImage
instead of a UIImage?
:
UIImage(systemSymbol: .cCircle)
UIImage(systemSymbol: SFSymbol.eCircleFill)
UIImage(systemSymbol: ._11CircleFill, withConfiguration: /* Some UIImage.Configuration */)
A SF Symbol SwiftUI.Image
can also be initialized using the SFSymbol
type:
Image(systemSymbol: .cCircle)
Image(systemSymbol: SFSymbol.eCircleFill)
There are also SwiftUI.Label
initializers:
Label("MyText", systemSymbol: .cCircle)
Label(LocalizedStringKey("my.text"), systemSymbol: SFSymbol.eCircleFill)
... and interfaces for UIButton
:
let button = UIButton.systemButton(with: .cCircle, target: self, selector: #selector(testMethod))
button.setImage(.eCircleFill, for: .normal)
... and an initializer for UIApplicationShortcutItem
:
UIApplicationShortcutIcon(systemSymbol: .cCircle)
UIApplicationShortcutIcon(systemSymbol: SFSymbol.eCircleFill)
... and finally also an initializer for AppKit's NSImage
:
NSImage(systemSymbol: .cCircle)
NSImage(systemSymbol: SFSymbol.eCircleFill, accessibilityDescription: "some.description")
Localization
SF Symbols can come with multiple different localizations. SFSafeSymbols
exposes localization the following way:
Implicit localization: When using an
SFSymbol
, it gets automatically localized to the user's current locale - nothing to do on your part. This behavior is managed by Apple's system implementation of SF Symbols.Explicit localization:
SFSafeSymbols
lets you access a symbol's localized versions as follows:
// 1. Static localization:
let a = SFSymbol.character.ar // corresponds to "character.ar"
let b = SFSymbol.character.zh // corresponds to "character.zh"
let c = SFSymbol.character.rtl // doesn't compile: "character.rtl" doesn't exist
// a, b have type SFSymbol
// 2. Dynamic localization:
SFSymbol.character.availableLocalizations // [.ar, .he, .hi, .ja, .ko, .th, .zh, .zhTraditional]
let a = SFSymbol.character.localized(to: .ar)
let b = SFSymbol.character.localized(to: .rtl)
// a, b have type SFSymbol?
Static localization only exposes the localizations which are actually available, so you cannot accidentally localize a non-localizable symbol.
Dynamic localization, in contrast, is useful when dealing with an array of SFSymbols
which all have different available localizations.
Attention: Serializing and deserializing SFSymbol
s currently makes them lose their explicit both static and dynamic localization information. Regaining dynamic localization information may be addressed in a future version of SFSafeSymbols
.
Contributing
Contributions are very much welcome! See CONTRIBUTING.md for more information.
License
This library is released under the MIT License. See LICENSE for details.
*Note that all licence references and agreements mentioned in the SFSafeSymbols README section above
are relevant to that project's source code only.