What is Apple’s SF Symbols in iOS? Goodbye Fontawesome
Every App is using some sort of icons or fonts or symbols, by integrating some sort of pod or package.
iOS 13.0 now is featured with UIImage(systemName:)
Use this method to retrieve system-defined symbol images
The UIImage(systemName:)
initializer is a way to create a new UIImage
object that contains a system-provided image for a given system symbol. This is useful for creating images for things like buttons and navigation bar items, where you want to use a standard image provided by the system.
Here is an example of how to use this initializer:
let image = UIImage(systemName: "square.and.arrow.up")
This initializer has several possible configurations, which are passed as arguments to the initializer. Here are some examples:
// Specify the font size of the image
let largeImage = UIImage(systemName: "square.and.arrow.up", withConfiguration: .init(pointSize: 20))
// Specify the weight and scale of the font used to draw the image
let boldImage = UIImage(systemName: "square.and.arrow.up", withConfiguration: .init(weight: .bold, scale: .large))
// Specify the color of the image
let redImage = UIImage(systemName: "square.and.arrow.up", withConfiguration: .init(pointSize: 20, weight: .bold, scale: .large…