国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > iOS > 正文

ionic ios打包配置以及bug修復整理

2019-11-09 16:37:51
字體:
來源:轉載
供稿:網友

一,ios打包配置 1.狀態欄重疊

第一次打包發現狀態欄重疊,網上搜索的原生代碼無效。最后通過在config.xml里設置實現。

<PReference name="StatusBarOverlaysWebView" value="false" />(重要) <preference name="StatusBarStyle" value="default" /> <preference name="StatusBarBackgroundColor" value="#72C147"/>

第二次打包發現頂部好了.但是header下面有一段margin,找到ionic.CSS(9600+行) 全部注釋。

/*.platform-ios.platform-cordova:not(.fullscreen) .bar-header:not(.bar-subheader) { height: 64px; }*//* .platform-ios.platform-cordova:not(.fullscreen) .bar-header:not(.bar-subheader).item-input-inset .item-input-wrapper { margin-top: 19px !important; } .platform-ios.platform-cordova:not(.fullscreen) .bar-header:not(.bar-subheader) > * { margin-top: 20px; }*//*.platform-ios.platform-cordova:not(.fullscreen) .tabs-top > .tabs,.platform-ios.platform-cordova:not(.fullscreen) .tabs.tabs-top { top: 64px; }.platform-ios.platform-cordova:not(.fullscreen) .has-header,.platform-ios.platform-cordova:not(.fullscreen) .bar-subheader { top: 64px; }.platform-ios.platform-cordova:not(.fullscreen) .has-subheader { top: 108px; }.platform-ios.platform-cordova:not(.fullscreen) .has-header.has-tabs-top { top: 113px; }.platform-ios.platform-cordova:not(.fullscreen) .has-header.has-subheader.has-tabs-top { top: 157px; }*/

2.隱藏啟動頁的加載圖標 config.xml里面

<preference name="ShowSplashScreenSpinner" value="false"/>

3.強制豎屏 config.xml里面

<preference name="orientation" value="portrait" />

二。bug修復

1.ios input會出現blur時把頂部頂到不見的情況 一般情況下在 內加入 overflow-scroll=”false”可以解決。

2.yhh項目的Ajax的采用angular的$http封裝,不再采用之前封裝的jquery的ajax,但是傳輸方式有點變化,需要在app.js 的 config

$httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';$httpProvider.defaults.transformRequest = function(data){ if (data === undefined) { return data; }; return $.param(data); };

封裝時 $http設置

headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}。

3.

4.android4.4以下webview的表現很差,于是集成crosswalk 直接安裝插件:

cordova plugin add cordova-plugin-crosswalk-webview

5.ios上無法格式化‘2005-01-12’的時間格式,需要替換成‘2005/01/12’的格式。

.replace(/-/g,"/"))

6.輪播圖更新后需要手動調用

$ionicSlideBoxDelegate.update();//更新$ionicSlideBoxDelegate.loop(true);//循環

7.debug包可以連接電腦開啟調試模式,要求系統>=4.4

谷歌瀏覽器輸入:Chrome://inspect

8.ios鍵盤擋住輸入框。特別是底部單獨有一個輸入框的情況的解決方法 (http://blog.csdn.net/lovelyelfpop/article/details/52033045) ios 的配置 config.xml 加入以下配置

<preference name="KeyboardShrinksView" value="true" /> <preference name="DisableScrollingWhenKeyboardShrinksView" value="true" />
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 霍山县| 紫云| 稷山县| 遂溪县| 福海县| 东兰县| 五原县| 伊川县| 富平县| 新巴尔虎左旗| 曲靖市| 青铜峡市| 新乐市| 洛隆县| 洛宁县| 马关县| 阜南县| 新河县| 邓州市| 大冶市| 浦县| 湟源县| 多伦县| 阿克陶县| 五常市| 铁岭县| 白水县| 公主岭市| 海盐县| 出国| 百色市| 临夏市| 德庆县| 台中市| 峨眉山市| 濮阳县| 贵定县| 安国市| 凉山| 三江| 马山县|