在ios7中使用phonegap的相机时,屏幕底部会出现空白区域

时间:2014-02-19 03:54:55

标签: iphone cordova ios7

在我的应用程序(jquery& phonegap项目)中,在iOS7中,每次使用相机时,底部都有一个空白的白色层。这在Android设备上不会发生。就在ios7中发生。 ios6还可以。

谁知道或有过类似的经历?

2 个答案:

答案 0 :(得分:1)

只需复制和替换

  static int score = 0;
- (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.

if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {
    CGRect viewBounds = [self.webView bounds];
    viewBounds.origin.y = 10;
    //viewBounds.size.height = viewBounds.size.height - 18;
    if (score==0) {
        viewBounds.size.height = viewBounds.size.height - 18;
        score=1;
    }
    self.webView.frame = viewBounds;


}

[super viewWillAppear:animated];
}

答案 1 :(得分:0)

只需复制

static int score = 0; - (void)viewWillAppear:(BOOL)动画 {     //查看默认值为完整大小。如果您想自定义视图的大小或其子视图(例如webView),     //你可以在这里这样做。

if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {
    CGRect viewBounds = [self.webView bounds];
    viewBounds.origin.y = 10;
    //viewBounds.size.height = viewBounds.size.height - 18;
    if (score==0) {
        viewBounds.size.height = viewBounds.size.height - 18;
        score=1;
    }
    self.webView.frame = viewBounds;


}

[super viewWillAppear:animated];

}