Skip to content

Commit

Permalink
prefer UIImage(named:) over #imageLiteral
Browse files Browse the repository at this point in the history
`#imageLiteral` make it hard in xcode to see what is going on
(they are replaced by some icon, so you cannot easily see the name of the image),
also, searching a bit, it seems, `UIImage(named:)` is quite the same -
but with less weird xcode issue we did not encounter yet :)
  • Loading branch information
r10s committed Jul 25, 2024
1 parent cb22024 commit 616dc22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deltachat-ios/Controller/AccountSwitchViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ class AccountCell: UITableViewCell {
view.translatesAutoresizingMaskIntoConstraints = false
view.widthAnchor.constraint(equalToConstant: 16).isActive = true
view.tintColor = DcColors.middleGray
view.image = #imageLiteral(resourceName: "volume_off").withRenderingMode(.alwaysTemplate)
view.image = UIImage(named: "volume_off")?.withRenderingMode(.alwaysTemplate)
view.contentMode = .scaleAspectFit
view.isAccessibilityElement = false
return view
Expand Down

0 comments on commit 616dc22

Please sign in to comment.