【问题标题】:Worklight iOS7 #wl_ios7bar disappears after keyboard displayedWorklight iOS7 #wl_ios7bar 在键盘显示后消失
【发布时间】:2013-11-14 21:27:04
【问题描述】:

我正在尝试修复以下问题中描述的白条和覆盖问题: Worklight 6.0.0.1 & iOS 7 - White bar along bottom of screen? 还有这个: IBM Worklight 5.0.6.1 - Bottom white space in iOS 7

我的目标是让覆盖显示在顶部并带有白色背景,然后在下面显示其他所有内容。感谢#wl_ios7bar,我能够实现这一点,但问题是一旦我弹出键盘,#wl_ios7bar 就会消失。我在下面截取了一些屏幕截图,并在 #wl_ios7bar 周围添加了一个红色边框(在 css 中)以显示它消失了。

我正在使用 Worklight Eclipse 插件的 Worklight 版本 6.0.0.20130926-1933,并且此问题仅在 iOS7 中出现。有什么建议么?

【问题讨论】:

    标签: ios7 ibm-mobilefirst


    【解决方案1】:

    我选择更改 Cordova 类来解决此问题。到目前为止,它运作良好。在 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];
    }
    

    【讨论】:

    • 感谢您的回复!不幸的是,这个解决方案也不太奏效。一旦我调出键盘,我的应用顶部就会被覆盖层和它后面的白色矩形覆盖。
    【解决方案2】:

    我在这里找到了答案: http://www-01.ibm.com/support/docview.wss?uid=swg27039574

    将 showIOS7StatusBar 设置为 false 并实现步骤 4 中显示的那些功能就可以了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-10-02
      • 1970-01-01
      • 2018-05-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-05-14
      相关资源
      最近更新 更多