Commit b54858a1 by Javier Heisekce

Arregla tamaño de imagen

parent 7abcdb34
......@@ -72,7 +72,7 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="SSh-qK-Te0">
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="SSh-qK-Te0">
<rect key="frame" x="137" y="69" width="100" height="100"/>
<constraints>
<constraint firstAttribute="height" constant="100" id="n9x-Ru-z25"/>
......
......@@ -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
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment