7 月,我使用 jQTouch 构建了一个 iPhone Web 应用程序。在 iOS 4 上,我对网络应用程序没有任何问题:内置的 jQTouch 动画(向左滑动、向右滑动)等如丝绸般光滑。
然而自从升级到iOS 5之后,这些核心的页面过渡动画(左滑、右滑和翻转)变得非常生涩。
可以在此处找到该网络应用程序(请将其添加到 iOS 5 iPhone 上的主屏幕) :
要查看效果,将其添加到主屏幕后,启动应用程序并持续点击主要按钮 - 速度、距离或时间。
我做了很多谷歌搜索,但一无所获,尽管我确信其他开发人员一定已经/将会受到这个问题的影响。
这个问题不仅限于我的 3GS 设备,因为我在其他人的设备(包括 iPhone 4)上尝试过,我也看到了同样的问题,但仅在 iOS 5 上。
我尝试过的东西:
-
更新我的 jquery.js到不同版本 - 包括最新 - 动画仍然不稳定
将 jQTouch 更新到最新版本 - 动画仍然不稳定生涩
剥离所有JavaScript,只留下jQTouch及其初始化 - 动画仍然生涩
删除了我所有的自定义CSS,只留下了默认的jQTouch CSS - 动画仍然不稳定
删除所有 CSS,除了 jqtouch.css 中的 CSS3 动画 - 动画仍然不稳定
删除html 元素 - 我注意到当我从网络应用程序中删除所有 select 和 input 元素时,动画再次变得平滑。然而,附加到这些元素的标记或 CSS 并没有什么奇怪的。这个问题是否仅仅与动画期间页面上的元素太多有关?
所以看来这个问题与 HTML 元素有关,而不是 JS 或 CSS,尽管我真的不明白为什么......除了 iphone 特定属性之外,标记都是有效的使用过诸如占位符和自动大写等。
奇怪的是jQTouch 演示 在 iOS 5 上看起来仍然很流畅
。非常感谢任何帮助/建议。
谢谢!
编辑:此外,“信息”页面上“弹跳”的按钮也变得不稳定。这使用了 jQuery UI 反弹效果。这是 iOS 4 上完全流畅的动画。
In July I built an iPhone web-app using jQTouch. On iOS 4 I had no problems with the web-app: The built-in jQTouch animations (slide left, slide right) etc were smooth as silk.
However, since the upgrade to iOS 5, these core page transition animations (slide left, slide right and flip) have become very jerky.
The web app can be found here (please add it to your home screen on your iOS 5 iPhone):
To see the effect, once it's added to your home screen, start the app and keep tapping the main buttons - Speed, Distance or Time.
I've done a lot of Googling and have found nothing, though I'm sure that other developers must have been / will be affected by this issue.
The issue is not just limited to my 3GS device as I have tried it on other people's devices (including iPhone 4) and I see the same issue, but only on iOS 5.
Stuff I have tried:
-
updating my jquery.js to different versions - including the latest - animations still jerky
-
updating jQTouch to the latest version - animations still jerky
-
stripping out all JavaScript, only leaving jQTouch and its initialization - animations still jerky
-
removing all of my custom css, only leaving the default jQTouch CSS - animations still jerky
-
removing all CSS, apart from just the CSS3 animations in jqtouch.css - animations still jerky
-
removing html elements - i noticed that when i removed all of the select and input elements from the web app, the animations became smooth again. However, there is nothing strange about the mark-up or CSS attached to these elements. Could this issue simply be to do with having too many elements on the page at once during an animation?
So it seems this issue is to do with HTML elements rather than JS or CSS, although I really can't figure out why...the mark-up is all valid apart from the iphone specific attributes i've used such as placeholder and autocapitalize etc.
Strange thing is that the animations on the jQTouch demo still seem smooth on iOS 5.
Any help/suggestions much appreciated.
Thanks!
Edit: Also, the button on the 'Info' page that 'bounces' has become jerky too. This uses the jQuery UI bounce effect. This was animation completely smooth on iOS 4.
发布评论