CB-10799 (ios) fix toolbar is shown in incorrect position when in-call status bar
This closes #203
This commit is contained in:
parent
d26ccd1f4d
commit
d735649fcd
@ -29,6 +29,7 @@
|
||||
#define kInAppBrowserToolbarBarPositionTop @"top"
|
||||
|
||||
#define TOOLBAR_HEIGHT 44.0
|
||||
#define STATUSBAR_HEIGHT 20.0
|
||||
#define LOCATIONBAR_HEIGHT 21.0
|
||||
#define FOOTER_HEIGHT ((TOOLBAR_HEIGHT) + (LOCATIONBAR_HEIGHT))
|
||||
|
||||
@ -1041,11 +1042,11 @@
|
||||
|
||||
- (void) viewDidLoad {
|
||||
|
||||
CGRect frame = [UIApplication sharedApplication].statusBarFrame;
|
||||
|
||||
CGRect statusBarFrame = [self invertFrameIfNeeded:[UIApplication sharedApplication].statusBarFrame];
|
||||
statusBarFrame.size.height = STATUSBAR_HEIGHT;
|
||||
// simplified from: http://stackoverflow.com/a/25669695/219684
|
||||
|
||||
UIToolbar* bgToolbar = [[UIToolbar alloc] initWithFrame:[self invertFrameIfNeeded:frame]];
|
||||
UIToolbar* bgToolbar = [[UIToolbar alloc] initWithFrame:statusBarFrame];
|
||||
bgToolbar.barStyle = UIBarStyleDefault;
|
||||
[bgToolbar setAutoresizingMask:UIViewAutoresizingFlexibleWidth];
|
||||
[self.view addSubview:bgToolbar];
|
||||
|
Loading…
Reference in New Issue
Block a user