mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-22 16:21:00 +00:00
13 lines
331 B
Swift
13 lines
331 B
Swift
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||
|
|
||
|
import UIKit
|
||
|
|
||
|
extension UIColor {
|
||
|
func image(_ size: CGSize = CGSize(width: 1, height: 1)) -> UIImage {
|
||
|
UIGraphicsImageRenderer(size: size).image { context in
|
||
|
self.setFill()
|
||
|
context.fill(CGRect(origin: .zero, size: size))
|
||
|
}
|
||
|
}
|
||
|
}
|