Skip to content

Commit

Permalink
code styling
Browse files Browse the repository at this point in the history
  • Loading branch information
noorhashem committed Jun 24, 2020
1 parent cd8a09b commit b1af71b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Extensions/Today/TodayViewController.swift
Expand Up @@ -203,14 +203,14 @@ extension UIButton {
func setBackgroundColor(_ color: UIColor, forState state: UIControl.State) {
let colorView = UIView(frame: CGRect(width: 1, height: 1))
colorView.backgroundColor = color

UIGraphicsBeginImageContext(colorView.bounds.size)
if let context = UIGraphicsGetCurrentContext() {
colorView.layer.render(in: context)
}
let colorImage = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()

self.setBackgroundImage(colorImage, for: state)
}
}
Expand Down

0 comments on commit b1af71b

Please sign in to comment.