Fix messy transitions for iOS7

This commit is contained in:
Guillaume BIENKOWSKI 2013-10-03 09:05:17 +02:00
parent 9b5da13f24
commit 1ca1cc1f80
2 changed files with 8 additions and 2 deletions

View file

@ -19,7 +19,8 @@
#import <UIKit/UIColor.h>
#define LINPHONE_MAIN_COLOR [UIColor colorWithRed:207.0f/255.0f green:76.0f/255.0f blue:41.0f/255.0f alpha:1.0f]
#define LINPHONE_MAIN_COLOR [UIColor colorWithRed:207.0f/255.0f green:76.0f/255.0f blue:41.0f/255.0f alpha:1.0f]
#define LINPHONE_SETTINGS_BG_IOS7 [UIColor colorWithWhite:0.88 alpha:1.0]
#define LINPHONE_TABLE_CELL_BACKGROUND_COLOR [UIColor colorWithRed:207.0f/255.0f green:76.0f/255.0f blue:41.0f/255.0f alpha:1.0f]
@interface UIColor (LightAndDark)

View file

@ -335,7 +335,12 @@
}
+ (void)removeBackground:(UIView*)view {
[view setBackgroundColor:[UIColor clearColor]];
// iOS7 transparent background is *really* transparent: with an alpha != 0
// it messes up the transitions. Use non-transparent BG for iOS7
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7)
[view setBackgroundColor:LINPHONE_SETTINGS_BG_IOS7];
else
[view setBackgroundColor:[UIColor clearColor]];
}
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {