mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Always capitalize placeholder icons
This commit is contained in:
parent
1a269e7cdf
commit
21778e7d6c
|
@ -37,6 +37,7 @@ public class PlaceholderIcon {
|
|||
}
|
||||
|
||||
private func getTextLayer(with diameter: CGFloat, colour: CGColor? = nil, text: String) -> CALayer {
|
||||
let text = text.capitalized
|
||||
let font = UIFont.boldSystemFont(ofSize: diameter / 2)
|
||||
let height = NSString(string: text).boundingRect(with: CGSize(width: diameter, height: CGFloat.greatestFiniteMagnitude),
|
||||
options: .usesLineFragmentOrigin, attributes: [ NSAttributedString.Key.font : font ], context: nil).height
|
||||
|
|
Loading…
Reference in a new issue