Gridicons-iOS is a small framework which produces images of the Gridicons icon set.
The framework can be installed either via CocoaPods:
pod 'Gridicons', :podspec => 'https://raw.github.com/Automattic/Gridicons-iOS/develop/Gridicons.podspec'
First, import the framework:
UIImage of a Gridicon is as simple as:
let icon = UIImage.gridicon(.pages)
With type inference, this can be shortened further:
icon = .gridicon(.pages)
You can optionally specify a size (default is 24 x 24):
let icon = UIImage.gridicon(.pages, size: CGSize(width: 100, height: 100))
The images that the framework produces use the
AlwaysTemplate rendering mode, so you can tint them however you like.
To add new icons as they're added to the Gridicons icon set, complete the following steps:
Gridicons.xcassetscatalog in this project
rake dependenciesto install SwiftGen
rake gento regenerate the
If you need to update a existing icon, update the PDF in the asset catalog with the new version and release a new pod version.
Gridicons-iOS is licensed under GNU General Public License v2 (or later).
|Last commit: 3 weeks ago|
xcassetsto resources bundles in