代码改变世界

Cordova V3.0.0中config.xml配置文件的iOS Configuration

2013-09-06 16:07  张智清  阅读(4548)  评论(0编辑  收藏  举报

<preference>

关于这个标签的可用设置有:

  • DisallowOverscroll 布尔值,默认false。如果不想要WebView出现橡皮筋滚动条,则设置为true
  • TopActivityIndicator   字符串值,默认gray。设置顶部状态栏的风格:whiteLarge, white, gray
  • EnableLocation  布尔值, 默认false。 设置为true,初始化gps定位插件。请设置Geolocation插件的onload属性为true。
  • EnableViewportScale  布尔值,默认false。设置为true,以防止通过meta标签来预设viewport缩放。
  • AutoHideSplashScreen  布尔值,默认true。设置为false,以控制启动画面由通过javascript API来隐藏。
  • FadeSplashScreen  布尔值,默认为true。设置为false,禁止启动画面淡入或淡出效果。
  • FadeSplashScreenDuration  浮点数,默认为2(秒)。启动画面淡入淡出时间。
  • ShowSplashScreenSpinner  布尔值,默认为true。设置为false,则隐藏splash-screen spinner。
  • MediaPlaybackRequiresUserAction  布尔值,默认为false。设置为true,则不允许HTML5 video自动播放。
  • AllowInlineMediaPlayback  布尔值,默认为false。 设置为true,则允许内联HTML5 media playback。即,在HTML文档的video元素也必须含有webkit-playsinline属性。
  • BackupWebStorage  字符串值,默认为cloud。有效的设置值有:none、local和cloud。
  • KeyboardDisplayRequiresUserAction  布尔值,默认为true。 设置为false以打开键盘,在通过Javascript focus()聚焦表单元素时。
  • SuppressesIncrementalRendering  布尔值, 默认为false。 设置为true,在被渲染之前一直等待,直到所有新视图内容已经接收到。
  • HideKeyboardFormAccessoryBar  布尔值,默认为false。 设置为true,隐藏键盘顶部的其他工具栏按钮,如Prev, Next, Done。
  • KeyboardShrinksView  布尔值,默认为false。 设置为true,则当键盘出现在上面时,收缩WebView。The WebView shrinks instead of the viewport shrinking and the page scrollable. This applies to apps that position their elements relative to the bottom of the WebView. This is the default behaviour on Android, and makes a lot of sense when building apps as opposed to webpages.