iPhone UIWebView local resources using Javascript and handling onorientationChange

前端 未结 5 583
被撕碎了的回忆
被撕碎了的回忆 2020-11-28 21:20

I\'m trying to server HTML Javascript and CSS content from an iPhone application\'s local resources, and I\'m having trouble handling onOrientationChange events and includin

5条回答
  •  情深已故
    2020-11-28 21:59

    It is better to use

    • (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation

    since safari is actually calling orientationChange AFTER the view has rotated.

    This was important to me because I needed to resize my HTML5 canvases AFTER the page had rotated and I knew how big it's container was.

提交回复
热议问题