1

I'm trying to fix the white bar and overlay problem described in questions such as this: Worklight 6.0.0.1 & iOS 7 - White bar along bottom of screen? and this: IBM Worklight 5.0.6.1 - Bottom white space in iOS 7

My goal is to have the overlay displayed at the top with a white background and then display everything else underneath. I am able to achieve this thanks to the #wl_ios7bar, but the problem is once I pop up a keyboard, the #wl_ios7bar disappears. I've taken some screenshot below and I've added a red border (in css) around #wl_ios7bar to show it disappears.

I'm using Worklight version 6.0.0.20130926-1933 of the Worklight Eclipse plugin and this problem only occurs in iOS7. Any suggestions? before keyboard

during keyboard

after keyboard

Community
  • 1
  • 1
Jonathan Sweetman
  • 605
  • 1
  • 6
  • 16

2 Answers2

1

I opted to change the Cordova class for this workaround. It's worked well so far. In CDVViewController.m

- (void)viewWillAppear:(BOOL)animated
{
    // View defaults to full size.  If you want to customize the view's size, or its subviews (e.g. webView),
    // you can do so here.
    //Lower screen 20px on ios 7
    if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {
        CGRect viewBounds = [self.webView bounds];
        viewBounds.origin.y = 20;
        viewBounds.size.height = viewBounds.size.height - 20;
        self.webView.frame = viewBounds;
    }
    [super viewWillAppear:animated];
}
Sam Nunnally
  • 2,291
  • 2
  • 19
  • 30
  • Thanks for the response! Unfortunately, this solution does not quite work either. Once I bring up the keyboard, the top of my app is covered by the overlay and the white rectangle behind it. – Jonathan Sweetman Nov 25 '13 at 21:33
0

I found the answer here: http://www-01.ibm.com/support/docview.wss?uid=swg27039574

set showIOS7StatusBar to false and implement those functions shown in step 4 and it is fine.

Jonathan Sweetman
  • 605
  • 1
  • 6
  • 16