diff --git a/Classes/Base.lproj/ContactDetailsView.xib b/Classes/Base.lproj/ContactDetailsView.xib
index 4f43d3fea..dc0d87a02 100644
--- a/Classes/Base.lproj/ContactDetailsView.xib
+++ b/Classes/Base.lproj/ContactDetailsView.xib
@@ -13,7 +13,9 @@
+
+
@@ -27,16 +29,16 @@
-
+
-
+
-
-
+
-
+
@@ -118,7 +120,7 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Classes/Base.lproj/DialerView.xib b/Classes/Base.lproj/DialerView.xib
index 4a0e8228c..bc7df1cbe 100644
--- a/Classes/Base.lproj/DialerView.xib
+++ b/Classes/Base.lproj/DialerView.xib
@@ -31,24 +31,24 @@
-
+
-
+
-
+
-
+
-
+
@@ -61,7 +61,7 @@
-
+
@@ -77,11 +77,11 @@
-
+
-
+
@@ -96,7 +96,7 @@
-
+
@@ -110,7 +110,7 @@
-
+
@@ -124,7 +124,7 @@
-
+
@@ -138,7 +138,7 @@
-
+
@@ -152,7 +152,7 @@
-
+
@@ -166,7 +166,7 @@
-
+
@@ -180,7 +180,7 @@
-
+
@@ -194,7 +194,7 @@
-
+
@@ -208,7 +208,7 @@
-
+
@@ -222,7 +222,7 @@
-
+
@@ -236,7 +236,7 @@
-
+
@@ -254,11 +254,11 @@
-
+
-
+
@@ -273,7 +273,7 @@
-
+
@@ -288,7 +288,7 @@
-
+
@@ -303,7 +303,7 @@
-
+
@@ -318,7 +318,7 @@
-
+
@@ -343,7 +343,7 @@
-
+
diff --git a/Classes/Base.lproj/HistoryDetailsView.xib b/Classes/Base.lproj/HistoryDetailsView.xib
index 15aa024e7..2f8e1a246 100644
--- a/Classes/Base.lproj/HistoryDetailsView.xib
+++ b/Classes/Base.lproj/HistoryDetailsView.xib
@@ -215,7 +215,7 @@
-
+
diff --git a/Classes/CallIncomingView.m b/Classes/CallIncomingView.m
index 358c8e3f5..1ea0fff63 100644
--- a/Classes/CallIncomingView.m
+++ b/Classes/CallIncomingView.m
@@ -42,12 +42,6 @@
[[NSNotificationCenter defaultCenter] removeObserver:self name:kLinphoneCallUpdate object:nil];
}
-- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
- duration:(NSTimeInterval)duration {
- [super willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration];
- [_avatarImage setRoundRadius];
-}
-
#pragma mark - UICompositeViewDelegate Functions
static UICompositeViewDescription *compositeDescription = nil;
diff --git a/Classes/CallOutgoingView.m b/Classes/CallOutgoingView.m
index ba922eecf..dd086198d 100644
--- a/Classes/CallOutgoingView.m
+++ b/Classes/CallOutgoingView.m
@@ -60,12 +60,6 @@ static UICompositeViewDescription *compositeDescription = nil;
}
}
-- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
- duration:(NSTimeInterval)duration {
- [super willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration];
- [_avatarImage setRoundRadius];
-}
-
- (IBAction)onDeclineClick:(id)sender {
LinphoneCall *call = linphone_core_get_current_call([LinphoneManager getLc]);
if (call) {
diff --git a/Classes/CallView.m b/Classes/CallView.m
index 62c53fcf4..62268ef46 100644
--- a/Classes/CallView.m
+++ b/Classes/CallView.m
@@ -215,13 +215,6 @@ static UICompositeViewDescription *compositeDescription = nil;
[super viewDidUnload];
}
-- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
- duration:(NSTimeInterval)duration {
- [super willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration];
- [_avatarImage setRoundRadius];
- // in mode display_filter_auto_rotate=0, no need to rotate the preview
-}
-
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
[super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
[self previewTouchLift];
diff --git a/Classes/ContactDetailsTableView.m b/Classes/ContactDetailsTableView.m
index abbd1f9a8..6daee58ab 100644
--- a/Classes/ContactDetailsTableView.m
+++ b/Classes/ContactDetailsTableView.m
@@ -694,10 +694,11 @@
tempLabel.text = text.uppercaseString;
tempLabel.textAlignment = NSTextAlignmentCenter;
tempLabel.font = [UIFont systemFontOfSize:15];
+ tempLabel.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
[tempView addSubview:tempLabel];
if (canAddEntry) {
- frame.origin.x = tableView.frame.size.width / 2 - 24;
+ frame.origin.x = tableView.frame.size.width / 2 - 28;
UIIconButton *tempAddButton = [[UIIconButton alloc] initWithFrame:frame];
[tempAddButton setImage:[UIImage imageNamed:@"add_field_default.png"] forState:UIControlStateNormal];
[tempAddButton setImage:[UIImage imageNamed:@"add_field_over.png"] forState:UIControlStateHighlighted];
@@ -705,6 +706,7 @@
[tempAddButton addTarget:self action:@selector(onAddClick:) forControlEvents:UIControlEventTouchUpInside];
tempAddButton.tag = section;
tempAddButton.accessibilityLabel = addEntryName;
+ tempAddButton.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin;
[tempView addSubview:tempAddButton];
}
diff --git a/Classes/ContactDetailsView.h b/Classes/ContactDetailsView.h
index 129b50cee..a2ebe9d20 100644
--- a/Classes/ContactDetailsView.h
+++ b/Classes/ContactDetailsView.h
@@ -27,7 +27,7 @@
#import "ImagePickerView.h"
@interface ContactDetailsView
- : UIViewController {
+ : TPMultiLayoutViewController {
ABAddressBookRef addressBook;
BOOL inhibUpdate;
}
diff --git a/Classes/ContactDetailsView.m b/Classes/ContactDetailsView.m
index def1ee196..430c6ced9 100644
--- a/Classes/ContactDetailsView.m
+++ b/Classes/ContactDetailsView.m
@@ -229,16 +229,17 @@ static UICompositeViewDescription *compositeDescription = nil;
_nameLabel.hidden = editing;
[ContactDisplay setDisplayNameLabel:_nameLabel forContact:_contact];
- CGRect frame = self.contentView.frame;
- frame.size.height -= _avatarImage.frame.origin.y + _avatarImage.frame.size.height;
- frame.origin.y = _nameLabel.frame.origin.y;
- if (!editing) {
- frame.origin.y += _nameLabel.frame.size.height;
- frame.size.height -= _nameLabel.frame.size.height;
+ if ([self viewIsCurrentlyPortrait]) {
+ CGRect frame = self.contentView.frame;
+ frame.size.height -= _avatarImage.frame.origin.y + _avatarImage.frame.size.height;
+ frame.origin.y = _nameLabel.frame.origin.y;
+ if (!editing) {
+ frame.origin.y += _nameLabel.frame.size.height;
+ frame.size.height -= _nameLabel.frame.size.height;
+ }
+
+ _tableController.tableView.frame = frame;
}
-
- _tableController.tableView.frame = frame;
-
if (animated) {
[UIView commitAnimations];
}
diff --git a/Classes/ContactsListTableView.m b/Classes/ContactsListTableView.m
index 42e182bbe..13ec6fe00 100644
--- a/Classes/ContactsListTableView.m
+++ b/Classes/ContactsListTableView.m
@@ -202,6 +202,7 @@ static void sync_address_book(ABAddressBookRef addressBook, CFDictionaryRef info
tempLabel.text = [addressBookMap keyAtIndex:section];
tempLabel.textAlignment = NSTextAlignmentCenter;
tempLabel.font = [UIFont boldSystemFontOfSize:17];
+ tempLabel.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
[tempView addSubview:tempLabel];
return tempView;
diff --git a/Classes/HistoryDetailsTableView.m b/Classes/HistoryDetailsTableView.m
index 38a5bb847..a8a11eefe 100644
--- a/Classes/HistoryDetailsTableView.m
+++ b/Classes/HistoryDetailsTableView.m
@@ -46,6 +46,7 @@
tempLabel.text = NSLocalizedString(@"Calls", nil);
tempLabel.textAlignment = NSTextAlignmentCenter;
tempLabel.font = [UIFont boldSystemFontOfSize:17];
+ tempLabel.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
[tempView addSubview:tempLabel];
return tempView;
diff --git a/Classes/HistoryListTableView.m b/Classes/HistoryListTableView.m
index 5503dbbcc..73f9956e1 100644
--- a/Classes/HistoryListTableView.m
+++ b/Classes/HistoryListTableView.m
@@ -175,6 +175,7 @@
}
tempLabel.textAlignment = NSTextAlignmentCenter;
tempLabel.font = [UIFont boldSystemFontOfSize:17];
+ tempLabel.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
[tempView addSubview:tempLabel];
return tempView;
diff --git a/Classes/LinphoneUI/Base.lproj/UIChatBubblePhotoCell.xib b/Classes/LinphoneUI/Base.lproj/UIChatBubblePhotoCell.xib
index f7b880dac..4b95ceb0d 100644
--- a/Classes/LinphoneUI/Base.lproj/UIChatBubblePhotoCell.xib
+++ b/Classes/LinphoneUI/Base.lproj/UIChatBubblePhotoCell.xib
@@ -113,7 +113,7 @@
-
+
diff --git a/Classes/LinphoneUI/Base.lproj/UIChatBubbleTextCell.xib b/Classes/LinphoneUI/Base.lproj/UIChatBubbleTextCell.xib
index f3a90494c..4eb4161c9 100644
--- a/Classes/LinphoneUI/Base.lproj/UIChatBubbleTextCell.xib
+++ b/Classes/LinphoneUI/Base.lproj/UIChatBubbleTextCell.xib
@@ -68,7 +68,7 @@
-
+
diff --git a/Classes/LinphoneUI/Base.lproj/UICompositeView.xib b/Classes/LinphoneUI/Base.lproj/UICompositeView.xib
index 9eba73e1d..e36ae20f5 100644
--- a/Classes/LinphoneUI/Base.lproj/UICompositeView.xib
+++ b/Classes/LinphoneUI/Base.lproj/UICompositeView.xib
@@ -78,8 +78,8 @@
-
-
+
+
diff --git a/Classes/LinphoneUI/Base.lproj/UIContactDetailsCell.xib b/Classes/LinphoneUI/Base.lproj/UIContactDetailsCell.xib
index cf9612d95..faa721798 100644
--- a/Classes/LinphoneUI/Base.lproj/UIContactDetailsCell.xib
+++ b/Classes/LinphoneUI/Base.lproj/UIContactDetailsCell.xib
@@ -1,8 +1,8 @@
-
+
-
+
@@ -38,7 +38,7 @@
-
+
@@ -53,11 +53,11 @@
-
+
-
+
@@ -71,7 +71,7 @@
-
+
diff --git a/Classes/LinphoneUI/UICompositeView.m b/Classes/LinphoneUI/UICompositeView.m
index 06d75bd60..718901e27 100644
--- a/Classes/LinphoneUI/UICompositeView.m
+++ b/Classes/LinphoneUI/UICompositeView.m
@@ -576,11 +576,14 @@
}
// Resize SideMenu
- CGRect sideMenuFrame = contentFrame;
+ CGRect sideMenuFrame;
if (UIInterfaceOrientationIsPortrait([self currentOrientation])) {
+ sideMenuFrame = contentFrame;
sideMenuFrame.size.height += tabFrame.size.height;
} else {
- sideMenuFrame.origin.x = 0;
+ sideMenuFrame = viewFrame;
+ sideMenuFrame.size.height -= statusBarFrame.size.height;
+ sideMenuFrame.origin.y = statusBarFrame.size.height;
}
if (!currentViewDescription.sideMenuEnabled) {
@@ -633,7 +636,6 @@
} else {
[_sideMenuViewController viewDidDisappear:YES];
}
-
// Dealloc old view description
}
diff --git a/Classes/LinphoneUI/UIRoundedImageView.m b/Classes/LinphoneUI/UIRoundedImageView.m
index 8ec2f42af..5c0c24d60 100644
--- a/Classes/LinphoneUI/UIRoundedImageView.m
+++ b/Classes/LinphoneUI/UIRoundedImageView.m
@@ -15,9 +15,18 @@
INIT_WITH_COMMON {
[self setRoundRadius];
[self setBordered:YES];
+ [[NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(orientationDidChange:)
+ name:@"UIDeviceOrientationDidChangeNotification"
+ object:nil];
+
return self;
}
+- (void)orientationDidChange:(NSNotification *)k {
+ [self setRoundRadius];
+}
+
- (void)setImage:(UIImage *)image {
[self setImage:image bordered:NO withRoundedRadius:TRUE];
}