Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    iOS - Web Kit Issue

    Hi,

    I face some issue when changing the size of my S'GWT app, embedded into a UIWebView, (here after changing the device orientation) as the content is not adapted properly. This works when the app is called directly from Safari. Reloading the Web view works, but is not really an option.

    (1) Am I right that I need to pass the new screen dims manually via
    stringByEvaluatingJavaScriptFromString to the S'GWT app?

    (2) If so, do I need to write the JS receiver by myself or is there something already there I can use?

    Kind regards,

    Ekki

    * GWT Rocks! * SmartGWT Rocks Even Harder! * GWT 2.0.3,
    SmartGWT PRO 2.3, JRE 1.6.0_20, Eclipse 3.6 *
    * Xcode 3.2.2 * iOS 3.0 (Base OS) *

    #2
    We're not really familiar with these APIs, but there is an API Page.updateViewPort() in Smart GWT that might be what you're looking for.

    Comment


      #3
      Hi Iso,

      it seems JS Page.resizeTo() is what I need. If I enter this in the Firebug JS Console the window gets resized immediately. Doing the same via UIWebView JS scripting doesn't do anything
      Code:
      [mWebView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"window.Page.resizeTo(%i, %i)", pWidth, pHeight]];
      Can you or anyone else help me here?

      Thx,

      Ekki

      * GWT Rocks! * SmartGWT Rocks Even Harder! * GWT 2.0.4,
      SmartGWT PRO 2.3, JRE 1.6.0_20, Eclipse 3.6.1 *
      * Xcode 3.2.2 * iOS 3.0 (Base OS) *

      Comment


        #4
        Not really, other than to recommend trying some alert()s to see if the code you're trying to run is executing at all.

        Comment

        Working...
        X