From b54858a17c25f13395eac5a0d175f31c8fa94fb0 Mon Sep 17 00:00:00 2001 From: Javier Heisekce Date: Wed, 8 Apr 2020 11:27:11 -0400 Subject: [PATCH] Arregla tamaƱo de imagen --- ContactsApp/Base.lproj/Main.storyboard | 2 +- ContactsApp/SingleContactViewController.swift | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ContactsApp/Base.lproj/Main.storyboard b/ContactsApp/Base.lproj/Main.storyboard index 9bf56c1..d60c746 100644 --- a/ContactsApp/Base.lproj/Main.storyboard +++ b/ContactsApp/Base.lproj/Main.storyboard @@ -72,7 +72,7 @@ - + diff --git a/ContactsApp/SingleContactViewController.swift b/ContactsApp/SingleContactViewController.swift index a2b4a8c..78e25ae 100644 --- a/ContactsApp/SingleContactViewController.swift +++ b/ContactsApp/SingleContactViewController.swift @@ -39,7 +39,10 @@ class SingleContactViewController: UIViewController { otherPhoneNumber.isHidden = false } if let image = contact.imageData { - profilePic.layer.cornerRadius = profilePic.frame.height / 2 + profilePic.layer.cornerRadius = (profilePic?.frame.width ?? 0.0) / 2 + profilePic.clipsToBounds = true + profilePic.layer.borderWidth = 3.0 + profilePic?.layer.borderColor = UIColor.white.cgColor if let imageData = UIImage(data: image){ profilePic.image = imageData } -- libgit2 0.26.0