简体   繁体   English

Ionic app上的奇怪闪烁,在iOS 9上运行

[英]Weird flickering on Ionic app, running on iOS 9

I've created an app for Android and iOS using Phonegap and Ionic Framework, the goes perfectly on Android but it has an issue on iOS specially with the iPhone 5 and the iPad (It works well on iPhone 6 and 4). 我使用Phonegap和Ionic Framework为Android和iOS创建了一个应用程序,在Android上非常完美,但它在iOS上特别适用于iPhone 5和iPad(在iPhone 6和4上运行良好)。

When you tap a button that makes the rol of a backbutton, the back animation is shown but inmediatly the goes back to the section where the backbutton was taped. 当您点击一个按钮进行后退按钮时,会显示后退动画,但是会立即返回到按钮背带的部分。 It only happens on one section, the backbutton works perfectly on the others sections. 它只发生在一个部分,后部按钮完全适用于其他部分。

The HTML element is the following: HTML元素如下:

<a class="button button-icon button-positive button-positive icon ion-arrow-left-c" ng-click="atras()">

The function called is "atras" which is the following (Located in the controller of the template): 被称为“atras”的函数如下(位于模板的控制器中):

 $scope.atras = function() {
        $ionicHistory.goBack();
 };

Have any idea of how could i resolve this? 知道我怎么能解决这个问题? Thanks a lot for your answers! 非常感谢你的回答!

Specifically, there is a notable patch for Ionic UIWebView that are built on iOS9. 具体来说,有一个基于iOS9构建的Ionic UIWebView的显着补丁。 Without this patch, you will experience such flickering issue when you tap on some back buttons in navigation bar. 如果没有此补丁,当您点击导航栏中的某些后退按钮时,您将遇到此类闪烁问题。 Please apply ngIOS9UIWebViewPatch for your project then it's all done. 请为您的项目应用ngIOS9UIWebViewPatch,然后全部完成。

https://gist.github.com/IgorMinar/863acd413e3925bf282c https://gist.github.com/IgorMinar/863acd413e3925bf282c

http://blog.ionic.io/ios-9-potential-breaking-change/ http://blog.ionic.io/ios-9-potential-breaking-change/

Unfortunately iOS 9 has some bugs with with window.location that impact the router-ui and also some empty href links <a href="#"> like yours. 不幸的是,iOS 9有一些错误,其中window.location会影响router-ui ,还有一些空的href链接<a href="#">和你的一样。

Take a look to these articles from Ionic's blog: 看一下Ionic博客上的这些文章:

There you can find the link to the iOS9 patch for angular and this for Disable App Transport Security in iOS 9 在那里你可以找到iOS9补丁角度的链接,这可以用于iOS 9中的禁用应用程序传输安全性

Add these two properties to prevent flickering effects: 添加这两个属性以防止闪烁效果:

-webkit-transform-style: preserve-3d;
-webkit-backface-visibility: hidden;

Apply also to flickering elements which AREN'T being animated for the same fix. 也适用于未针对相同修复设置动画的闪烁元素。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM