diff --git a/Example/MailExample/MailViewController.swift b/Example/MailExample/MailViewController.swift index 81bb9a45..7a44eff2 100644 --- a/Example/MailExample/MailViewController.swift +++ b/Example/MailExample/MailViewController.swift @@ -94,7 +94,7 @@ extension MailViewController: SwipeTableViewCellDelegate { return [read] } else { let flag = SwipeAction(style: .default, title: "Flag", handler: nil) - flag.backgroundColor = UIColor(colorLiteralRed: 1, green: 148/255, blue: 0, alpha: 1) + flag.backgroundColor = #colorLiteral(red: 1, green: 0.5803921569, blue: 0, alpha: 1) flag.hidesWhenSelected = true flag.image = #imageLiteral(resourceName: "Flag") diff --git a/Source/SwipeActionsView.swift b/Source/SwipeActionsView.swift index 9e8c6097..be50b77c 100644 --- a/Source/SwipeActionsView.swift +++ b/Source/SwipeActionsView.swift @@ -77,7 +77,7 @@ class SwipeActionsView: UIView { clipsToBounds = true translatesAutoresizingMaskIntoConstraints = false - backgroundColor = options.backgroundColor ?? UIColor(colorLiteralRed: 220/255, green: 220/255, blue: 220/255, alpha: 1) + backgroundColor = options.backgroundColor ?? #colorLiteral(red: 0.862745098, green: 0.862745098, blue: 0.862745098, alpha: 1) addButtons(for: self.actions, withMaximum: maxSize) }