Canvas resize issue on iPad App inside div/iframe

0 favourites
  • 5 posts
From the Asset Store
Simple resize and rotate events for any sprite, quick and easy event sheet that you can use for your own projects.
  • Link to .capx file (required! If link is blocked remove the http and www parts):

    dl.dropboxusercontent.com/u/28297064/Ordering%20of%20Planets%20-%20finalized%20new%20look-latest%20version.capx

    Steps to reproduce:

    1. For an App created on iPad (P.S: I have recorded my App running live on iPad with great difficulty. Please check the recorded video link here - dl.dropboxusercontent.com/u/28297064/Untitled.mov)

    2.The exported HTML5 is called inside an iframe ( with link target="myframe" in the below code). This iframe is present inside the <div> tags containing header & footer. I have cut-pasted portion of the code below for you to see what I meant -

        <div data-role="page" id="next-main-wrapper" class="ui-page app" data-theme="a" >

            <div data-role="header" id="next-main-header" data-theme="d">

               <h1> Earth and Space </h1>

            </div>

            <div id="allNextContent" data-role="content">

                 <iframe name="myframe" id="myframe" seamless="seamless">

                 </iframe>

            </div>

            <div data-role="footer" data-theme="d">

                     <p>Copyright 2013 </p>

            </div>

        </div>

    2.

    3.

    Observed result:

    As can be seen from the video, it loads with the correct size but then somehow starts getting resized (rather over sized) beyond the screen limits! (I have recorded the screen of iPad, running my App live. Please check the recorded video here - dl.dropboxusercontent.com/u/28297064/Untitled.mov )

    This behavior is observed only on iPad App only. In browsers it works fine! I have also tried removing canvas resize function inside index.html of the exported HTML5 but no change...I simply dont understand what is causing this!

    Expected result:

    Using letterbox scale option it should have fit exactly within the iframe but should not oversize.

    Browsers affected:

    This oversizing behavior is strangely observed only on iPad App somehow. In all other browsers it works fine! FYI...I invoke the same code in web apps as well and all of them work fine without issues.

    Chrome: yes/no

    Firefox: yes/no

    Internet Explorer: yes/no

    Operating system & service pack: iOS/iPad

    Construct 2 version:158 stable release

  • iOS has buggy iframe support. Try adding these attributes to the iframe tag:

    scrolling="no" noresize="noresize"

  • Thanks Ashley. It worked brilliantly! This has been pestering me for a while with very little help on the internet. You made my day. Thanks a lot.

    There is one more issue that I have been facing with the offline cache. When offline - And with my App containing 2 games that are called from a main menu - when I come out of first game to main menu and click another game ( assuming both games were cached when online), the second game would not load...the page still remains on the first one. Any solution to circumvent this? I have educational apps running on iTunes that suffer this offline issue which have been reported by the customers...Any help is highly appreciated. Though I have posted this in the regular forums couple of times, no one responded...Please help.

  • kmsravindra - closing this issue. If you have a different issue to the one reported in this thread, please post a new bug report following all the same guidelines again, we need all that information to be able to help.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Well, if you got the right hardware/software to delete apps on iPad, you can erase just about anything from any computer/device. The only surefire way to prevent such is to toss your phone into a blast furnace. However, the right equipment to delete data from phone is not so easy, and generally not available to most users.

    If you go to Settings>General>Reset>Erase all content and settings

    Once you do that it will put the phone into setup mode with iPhone Data Eraser and everything will be deleted from the phone and they won't be able to get your information back.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)