Skip to content
Snippets Groups Projects
Commit f753a6be authored by Bruno Muniz's avatar Bruno Muniz :apple:
Browse files

Improving ux w/ avatar view substring

parent ac350799
No related branches found
No related tags found
2 merge requests!40v1.1.2b166,!39Fixing QA bugs before releasing
...@@ -48,6 +48,12 @@ public final class AvatarView: UIView { ...@@ -48,6 +48,12 @@ public final class AvatarView: UIView {
public func setupProfile(title: String, image: Data?, size: AvatarView.Size) { public func setupProfile(title: String, image: Data?, size: AvatarView.Size) {
iconImageView.image = nil iconImageView.image = nil
monogramLabel.text = title
.trimmingCharacters(in: .whitespacesAndNewlines)
.replacingOccurrences(of: " ", with: "")
.prefix(2)
.uppercased()
monogramLabel.text = "\(title.prefix(2))".uppercased() monogramLabel.text = "\(title.prefix(2))".uppercased()
// TODO: What are the font sizes and corner radius for small/medium avatars? // TODO: What are the font sizes and corner radius for small/medium avatars?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment