Cordova在iOS上面几个兼容问题

1、使用CDVKeyboard插件,填写输入框,键盘上移20px的问题

Keyboard.automaticScrollToTopOnHiding =true;

2、出现导航条上移20px,一部分的导航条被状态栏遮挡的问题

- (void)viewWillAppear:(BOOL)animated

{

if([[[UIDevicecurrentDevice]systemVersion]floatValue]>=7)

{

CGRectviewBounds=[self.webViewbounds];

viewBounds.origin.y=20;

viewBounds.size.height=viewBounds.size.height-20;

self.webView.frame=viewBounds;

}

[superviewWillAppear:animated];

}

-(void)viewWillDisappear:(BOOL)animated

{

if([[[UIDevicecurrentDevice]systemVersion]floatValue]>=7)

{

CGRectviewBounds=[self.webViewbounds];

viewBounds.origin.y=20;

viewBounds.size.height=viewBounds.size.height+20;

self.webView.frame=viewBounds;

}

[superviewWillDisappear:animated];

}

3、使用不能打开网页

一些白名单没有添加,比如:<allow-navigation href="*">

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容