From afd591afa9940d2e15ba1dbfa86d90680dd40440 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Wed, 25 Jul 2012 18:25:13 +0200 Subject: [PATCH] Fix Dialer button in dialer bar Fix rotation animations --- Classes/InCallViewController.xib | 67 ++++++++++++------- Classes/LinphoneUI/UICallBar.xib | 6 +- .../LinphoneUI/UICompositeViewController.m | 8 ++- .../TPMultiLayoutViewController.m | 10 +-- 4 files changed, 57 insertions(+), 34 deletions(-) diff --git a/Classes/InCallViewController.xib b/Classes/InCallViewController.xib index 2e36e4b97..cb842bcb8 100644 --- a/Classes/InCallViewController.xib +++ b/Classes/InCallViewController.xib @@ -47,13 +47,27 @@ 274 YES + + + 301 + {{-1000, -1000}, {2000, 2000}} + + + + _NS:9 + + 3 + MAA + + IBCocoaTouchFramework + 274 - {{1000, 1000}, {320, 460}} + {320, 460} - + _NS:196 3 @@ -64,20 +78,20 @@ 265 - {{1214, 1354}, {106, 106}} + {{214, 354}, {106, 106}} - + IBCocoaTouchFramework 301 - {{1137, 1214}, {37, 37}} + {{141, 212}, {37, 37}} - + _NS:1030 NO IBCocoaTouchFramework @@ -86,15 +100,12 @@ 0 - {{-1000, -1000}, {2320, 2460}} + {320, 460} - + _NS:196 - - 3 - MAA - + IBCocoaTouchFramework @@ -103,7 +114,7 @@ {{0, -10}, {320, 480}} - + _NS:418 YES @@ -134,7 +145,6 @@ {85, 33} - _NS:9 NO IBCocoaTouchFramework @@ -168,7 +178,7 @@ {320, 460} - + NO IBCocoaTouchFramework @@ -250,14 +260,6 @@ 109 - - - dataSource - - - - 168 - delegate @@ -266,6 +268,14 @@ 169 + + + dataSource + + + + 168 + preview @@ -324,6 +334,7 @@ + video @@ -364,6 +375,12 @@ callTableController + + 173 + + + background + 106 @@ -390,6 +407,7 @@ 160.IBUIButtonInspectorSelectedStateConfigurationMetadataKey 162.CustomClassName 162.IBPluginDependency + 173.IBPluginDependency 9.IBPluginDependency @@ -409,6 +427,7 @@ InCallTableViewController com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -423,7 +442,7 @@ - 172 + 173 diff --git a/Classes/LinphoneUI/UICallBar.xib b/Classes/LinphoneUI/UICallBar.xib index 4a967672c..322742dd5 100644 --- a/Classes/LinphoneUI/UICallBar.xib +++ b/Classes/LinphoneUI/UICallBar.xib @@ -1705,9 +1705,9 @@ dialerButton - + - 139 + 140 @@ -2446,7 +2446,7 @@ - 139 + 140 diff --git a/Classes/LinphoneUI/UICompositeViewController.m b/Classes/LinphoneUI/UICompositeViewController.m index ea275ea23..578224e03 100644 --- a/Classes/LinphoneUI/UICompositeViewController.m +++ b/Classes/LinphoneUI/UICompositeViewController.m @@ -182,7 +182,6 @@ [contentViewController willRotateToInterfaceOrientation:correctOrientation duration:duration]; [tabBarViewController willRotateToInterfaceOrientation:correctOrientation duration:duration]; [stateBarViewController willRotateToInterfaceOrientation:correctOrientation duration:duration]; - [self update:nil tabBar:nil fullscreen:nil]; } - (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { @@ -191,6 +190,7 @@ [contentViewController willAnimateRotationToInterfaceOrientation:correctOrientation duration:duration]; [tabBarViewController willAnimateRotationToInterfaceOrientation:correctOrientation duration:duration]; [stateBarViewController willAnimateRotationToInterfaceOrientation:correctOrientation duration:duration]; + [self update:nil tabBar:nil fullscreen:nil]; } - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { @@ -278,18 +278,22 @@ orientation = self.interfaceOrientation; [super willRotateToInterfaceOrientation:correctOrientation duration:0]; + [super willAnimateRotationToInterfaceOrientation:correctOrientation duration:0]; [super didRotateFromInterfaceOrientation:orientation]; orientation = contentViewController.interfaceOrientation; [contentViewController willRotateToInterfaceOrientation:correctOrientation duration:0]; + [contentViewController willAnimateRotationToInterfaceOrientation:correctOrientation duration:0]; [contentViewController didRotateFromInterfaceOrientation:orientation]; orientation = tabBarViewController.interfaceOrientation; [tabBarViewController willRotateToInterfaceOrientation:correctOrientation duration:0]; - [contentViewController didRotateFromInterfaceOrientation:orientation]; + [tabBarViewController willAnimateRotationToInterfaceOrientation:correctOrientation duration:0]; + [tabBarViewController didRotateFromInterfaceOrientation:orientation]; orientation = stateBarViewController.interfaceOrientation; [stateBarViewController willRotateToInterfaceOrientation:correctOrientation duration:0]; + [stateBarViewController willAnimateRotationToInterfaceOrientation:correctOrientation duration:0]; [stateBarViewController didRotateFromInterfaceOrientation:orientation]; } diff --git a/Classes/Utils/TPMultiLayoutViewController/TPMultiLayoutViewController.m b/Classes/Utils/TPMultiLayoutViewController/TPMultiLayoutViewController.m index f57fdf46d..668e0d747 100755 --- a/Classes/Utils/TPMultiLayoutViewController/TPMultiLayoutViewController.m +++ b/Classes/Utils/TPMultiLayoutViewController/TPMultiLayoutViewController.m @@ -72,12 +72,12 @@ viewIsCurrentlyPortrait = UIInterfaceOrientationIsPortrait(newOrientation); } -- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { - [super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration]; - if ( (UIInterfaceOrientationIsPortrait(toInterfaceOrientation) && !viewIsCurrentlyPortrait) || - (UIInterfaceOrientationIsLandscape(toInterfaceOrientation) && viewIsCurrentlyPortrait) ) { +- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { + [super willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration]; + //if ( (UIInterfaceOrientationIsPortrait(toInterfaceOrientation) && !viewIsCurrentlyPortrait) || + // (UIInterfaceOrientationIsLandscape(toInterfaceOrientation) && viewIsCurrentlyPortrait) ) { [self applyLayoutForInterfaceOrientation:toInterfaceOrientation]; - } + //} } #pragma mark - Helpers