diff --git a/Classes/Base.lproj/AboutView.xib b/Classes/Base.lproj/AboutView.xib index fdbe70145..fa0f7623e 100644 --- a/Classes/Base.lproj/AboutView.xib +++ b/Classes/Base.lproj/AboutView.xib @@ -1,8 +1,8 @@ - + - + @@ -154,6 +154,7 @@ + @@ -163,9 +164,4 @@ - - - - - diff --git a/Classes/Base.lproj/AssistantViewScreens.xib b/Classes/Base.lproj/AssistantViewScreens.xib index 7215ccf07..5bfb95b2b 100644 --- a/Classes/Base.lproj/AssistantViewScreens.xib +++ b/Classes/Base.lproj/AssistantViewScreens.xib @@ -1,8 +1,8 @@ - + - + @@ -393,7 +393,7 @@ - + diff --git a/Classes/Base.lproj/CallIncomingView.xib b/Classes/Base.lproj/CallIncomingView.xib index d2b845f23..61be53820 100644 --- a/Classes/Base.lproj/CallIncomingView.xib +++ b/Classes/Base.lproj/CallIncomingView.xib @@ -1,17 +1,17 @@ - + - + - + - + @@ -22,11 +22,11 @@ - + - - + @@ -45,7 +45,7 @@ - diff --git a/Classes/Base.lproj/CallOutgoingView.xib b/Classes/Base.lproj/CallOutgoingView.xib index 0ca67c9c0..1bc8bc9e4 100644 --- a/Classes/Base.lproj/CallOutgoingView.xib +++ b/Classes/Base.lproj/CallOutgoingView.xib @@ -1,17 +1,17 @@ - + - + - + - + @@ -20,11 +20,11 @@ - + - - + + + + + + diff --git a/Classes/Base.lproj/CallView.xib b/Classes/Base.lproj/CallView.xib index 8aeecbcff..f771689a4 100644 --- a/Classes/Base.lproj/CallView.xib +++ b/Classes/Base.lproj/CallView.xib @@ -1,8 +1,8 @@ - + - + @@ -20,6 +20,7 @@ + @@ -34,6 +35,7 @@ + @@ -74,15 +76,15 @@ - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Classes/Base.lproj/DialerView.xib b/Classes/Base.lproj/DialerView.xib index ba8c0f444..78361800d 100644 --- a/Classes/Base.lproj/DialerView.xib +++ b/Classes/Base.lproj/DialerView.xib @@ -1,8 +1,8 @@ - + - + @@ -36,11 +36,11 @@ - + - + @@ -255,11 +255,11 @@ - + - - - - + - + - + - - + - + - - - + + - - + + - - - - - - - + + + - - - + + + - + - - - - + + + - + - diff --git a/Classes/LinphoneUI/Base.lproj/UICompositeView.xib b/Classes/LinphoneUI/Base.lproj/UICompositeView.xib index b6eac808b..9eba73e1d 100644 --- a/Classes/LinphoneUI/Base.lproj/UICompositeView.xib +++ b/Classes/LinphoneUI/Base.lproj/UICompositeView.xib @@ -1,9 +1,9 @@ - + - + @@ -60,8 +60,8 @@ - - + + @@ -72,8 +72,8 @@ - - + + diff --git a/Classes/LinphoneUI/TabBarView.m b/Classes/LinphoneUI/TabBarView.m index 10ee33e04..0930ae799 100644 --- a/Classes/LinphoneUI/TabBarView.m +++ b/Classes/LinphoneUI/TabBarView.m @@ -136,7 +136,7 @@ static NSString *const kDisappearAnimation = @"disappear"; #pragma mark - UI Update - (void)update:(BOOL)appear { - [self updateSelectedButton:[PhoneMainView.instance firstView]]; + [self updateSelectedButton:[PhoneMainView.instance currentView]]; [self updateMissedCall:linphone_core_get_missed_calls_count([LinphoneManager getLc]) appear:appear]; [self updateUnreadMessage:appear]; } @@ -222,15 +222,29 @@ static NSString *const kDisappearAnimation = @"disappear"; [view equal:ChatConversationCreateView.compositeViewDescription] || [view equal:ChatConversationView.compositeViewDescription]; CGRect selectedNewFrame = _selectedButtonImage.frame; - selectedNewFrame.origin.x = - (historyButton.selected - ? historyButton.frame.origin.x - : (contactsButton.selected - ? contactsButton.frame.origin.x - : (dialerButton.selected - ? dialerButton.frame.origin.x - : (chatButton.selected ? chatButton.frame.origin.x - : -selectedNewFrame.size.width /*hide it if none is selected*/)))); + if ([self viewIsCurrentlyPortrait]) { + selectedNewFrame.origin.x = + (historyButton.selected + ? historyButton.frame.origin.x + : (contactsButton.selected + ? contactsButton.frame.origin.x + : (dialerButton.selected + ? dialerButton.frame.origin.x + : (chatButton.selected + ? chatButton.frame.origin.x + : -selectedNewFrame.size.width /*hide it if none is selected*/)))); + } else { + selectedNewFrame.origin.y = + (historyButton.selected + ? historyButton.frame.origin.y + : (contactsButton.selected + ? contactsButton.frame.origin.y + : (dialerButton.selected + ? dialerButton.frame.origin.y + : (chatButton.selected + ? chatButton.frame.origin.y + : -selectedNewFrame.size.height /*hide it if none is selected*/)))); + } _selectedButtonImage.frame = selectedNewFrame; } diff --git a/Classes/LinphoneUI/UICompositeView.m b/Classes/LinphoneUI/UICompositeView.m index cc4365568..b73e41ce9 100644 --- a/Classes/LinphoneUI/UICompositeView.m +++ b/Classes/LinphoneUI/UICompositeView.m @@ -529,37 +529,46 @@ origin = 0; if (self.statusBarViewController != nil && currentViewDescription.statusBarEnabled) { - contentFrame.origin.y = origin + statusBarFrame.size.height; statusBarFrame.origin.y = origin; } else { - contentFrame.origin.y = origin; statusBarFrame.origin.y = origin - statusBarFrame.size.height; } + contentFrame.origin.y = statusBarFrame.origin.y + statusBarFrame.size.height; // Resize TabBar CGRect tabFrame = self.tabBarView.frame; if (self.tabBarViewController != nil && currentViewDescription.tabBarEnabled) { - tabFrame.origin.y = viewFrame.size.height; - tabFrame.origin.x = viewFrame.size.width; - tabFrame.size.height = self.tabBarViewController.view.frame.size.height; - // tabFrame.size.width = self.tabBarViewController.view.frame.size.width; - tabFrame.origin.y -= tabFrame.size.height; - tabFrame.origin.x -= tabFrame.size.width; - contentFrame.size.height = tabFrame.origin.y - contentFrame.origin.y; + if (UIInterfaceOrientationIsLandscape([self currentOrientation])) { + tabFrame.origin.x = 0; + tabFrame.origin.y = contentFrame.origin.y; + tabFrame.size.height = viewFrame.size.height - contentFrame.origin.y; + contentFrame.origin.x = tabFrame.size.width; + contentFrame.size.height = tabFrame.size.height; + } else { + tabFrame.origin.y = viewFrame.size.height; + tabFrame.origin.x = viewFrame.size.width; + tabFrame.size.height = self.tabBarViewController.view.frame.size.height; + // tabFrame.size.width = self.tabBarViewController.view.frame.size.width; + tabFrame.origin.y -= tabFrame.size.height; + tabFrame.origin.x -= tabFrame.size.width; + contentFrame.size.height = tabFrame.origin.y - contentFrame.origin.y; - // for some views, we need the content to overlap, in which case - // we insert in the tab XIB a mask with tag -1 and with y = the amount of - // points that the content should overlap. - for (UIView *view in self.tabBarViewController.view.subviews) { - if (view.tag == -1) { - contentFrame.size.height += view.frame.origin.y; - break; + // for some views, we need the content to overlap, in which case + // we insert in the tab XIB a mask with tag -1 and with y = the amount of + // points that the content should overlap. + for (UIView *view in self.tabBarViewController.view.subviews) { + if (view.tag == -1) { + contentFrame.size.height += view.frame.origin.y; + break; + } } } } else { + contentFrame.origin.x = 0; contentFrame.size.height = viewFrame.size.height - contentFrame.origin.y; tabFrame.origin.y = viewFrame.size.height; } + contentFrame.size.width = viewFrame.size.width - contentFrame.origin.x; if (currentViewDescription.fullscreen) { // contentFrame.origin.y = origin; @@ -568,9 +577,14 @@ // Resize SideMenu CGRect sideMenuFrame = contentFrame; - sideMenuFrame.size.height += tabFrame.size.height; + if (UIInterfaceOrientationIsPortrait([self currentOrientation])) { + sideMenuFrame.size.height += tabFrame.size.height; + } else { + sideMenuFrame.origin.x = 0; + } + if (!currentViewDescription.sideMenuEnabled) { - sideMenuFrame.origin.x = -contentFrame.size.width; + sideMenuFrame.origin.x = -sideMenuFrame.size.width; } // Set frames