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

首頁 > 系統 > iOS > 正文

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

2019-11-09 15:22:35
字體:
來源:轉載
供稿:網友

一,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" />
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 丹巴县| 青海省| 五指山市| 靖州| 长白| 正宁县| 曲水县| 英吉沙县| 周口市| 秦皇岛市| 贺兰县| 通道| 灯塔市| 龙口市| 汶上县| 汽车| 永修县| 开鲁县| 突泉县| 彭山县| 桃江县| 漳浦县| 石柱| 古丈县| 新蔡县| 永清县| 鹿邑县| 福贡县| 汤原县| 洪雅县| 扎囊县| 太仆寺旗| 凤阳县| 文登市| 营口市| 卓尼县| 全南县| 阿克苏市| 香港 | 普格县| 西和县|