UIImage
public extension UIImage
A SAP Icon extension to UIImage.
-
Get a SAP Icon image with the given url, size and icon color.
Declaration
Swift
static func fromIconUrl(url: String, size: CGSize = CGSize(width: 50, height: 50), color: UIColor?) -> UIImage?
Parameters
url
The image url.
size
The image size.
color
The icon color.
Return Value
An image that will appear as icon with SAP Icon
-
Get a SAP Icon image with the given icon name, text color, size and an optional background color.
Declaration
Swift
static func fromIcon(_ name: SAPIcon, _ textColor: UIColor, _ size: CGSize, _ backgroundColor: UIColor = UIColor.clear) -> UIImage
Parameters
name
The preferred icon name.
textColor
The text color.
size
The image size.
backgroundColor
The background color (optional).
Return Value
An image that will appear as icon with SAP Icon
-
Get a SAP Icon image with the given icon css code, text color, size and an optional background color.
Declaration
Swift
static func fromIconFont(_ fontName: SAPFontName, _ code: String, _ textColor: UIColor, _ size: CGSize, _ backgroundColor: UIColor = UIColor.clear) -> UIImage?
Parameters
fontName
SAP font name.
code
The preferred icon css code.
textColor
The text color.
size
The image size.
backgroundColor
The background color (optional).
Return Value
An image that will appear as icon with SAP Icon