From 57a9179a30afb27859c7f1821a230c6eddd35eac Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Fri, 16 Jan 2015 08:47:23 +0100 Subject: [PATCH] Do not resize UIRoundendImageView actually because on rotation everything is broken --- Classes/LinphoneUI/UIRoundedImageView.m | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Classes/LinphoneUI/UIRoundedImageView.m b/Classes/LinphoneUI/UIRoundedImageView.m index 983b9570c..ed33f80e6 100644 --- a/Classes/LinphoneUI/UIRoundedImageView.m +++ b/Classes/LinphoneUI/UIRoundedImageView.m @@ -31,14 +31,14 @@ // warning: for non-squared image, this function will generate an ellipsoidal image, not a round image! - (void)setRoundRadius:(BOOL)radius { - CALayer *imageLayer = self.layer; - CGFloat height = frame.size.height; - CGFloat width = frame.size.width; - CGFloat roundRadius = height > width ? width / 2 : height / 2; + CALayer *imageLayer = self.layer; + CGFloat height = imageLayer.frame.size.height; + CGFloat width = imageLayer.frame.size.width; + CGFloat roundRadius = height > width ? width / 2 : height / 2; - [imageLayer setCornerRadius:roundRadius]; - [imageLayer setBorderWidth:0]; - [imageLayer setMasksToBounds:YES]; + [imageLayer setCornerRadius:roundRadius]; + [imageLayer setBorderWidth:0]; + [imageLayer setMasksToBounds:YES]; }