Skip to content

Instantly share code, notes, and snippets.

@pr0zac
Created April 19, 2019 19:41
Show Gist options
  • Save pr0zac/702545847906ec3eb7ff8a4b3bb8d9d5 to your computer and use it in GitHub Desktop.
Save pr0zac/702545847906ec3eb7ff8a4b3bb8d9d5 to your computer and use it in GitHub Desktop.
diff --git a/Vault/Views/General/ProfilePictureGroupView.swift b/Vault/Views/General/ProfilePictureGroupView.swift
index 158bc0b..31b6408 100644
--- a/Vault/Views/General/ProfilePictureGroupView.swift
+++ b/Vault/Views/General/ProfilePictureGroupView.swift
@@ -83,7 +83,7 @@ final class ProfilePictureGroupView: UIView {
let minX = subviews.reduce(0) { acc, v in min(acc, v.frame.minX) }
let maxX = subviews.reduce(0) { acc, v in max(acc, v.frame.maxX) }
- let width = ceil(maxX - minX)
+ let width = max(ceil(maxX - minX), preferredSize.width)
preferredSize = CGSize(
width: width,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment