How to resize Webview Cordova in iOS?

I'm following the documentation on this page:
Integrating the Webview. PhoneGap Docs

I used the approach of cocoa pods and I use the latest version of xcode and swift with the sample ios phone gap project, so cordova 4.01.

The application runs fun and together testing JS-> Native communications seem to work too well.  However, the problem is that I can't resize the Web display so I can put other native controls on the screen.  I'm trying to resize the Web view to allow a space at the top and bottom of the native controls.

It works if I comment out the plugin 'cordova-plugin-wkwebview-engine' cordova - plugins.js in the sample ios phone gap project, but then of course, no other functions work.  Also, it seems to load correctly sized initially, but then flashes and the Web will once again full-screen.

I notice that even the demo provided in the documentation video has the same problem, but it seems to be not mentioned or ignored in the video.

See:

SWIFT-cordova-demo - YouTube

Please help with this question and then update the documentation/video accordingly.  Thank you very much!

Here's the code to my custom view controller which extends the CDVViewController:

import UIKit

class GolfViewController: {CDVViewController}

Override func viewDidLoad() {}

super.viewDidLoad)

Do any additional configuration after the loading of the view.

}

Override func didReceiveMemoryWarning() {}

super.didReceiveMemoryWarning)

Get rid of all the resources that can be recreated.

}

Override func viewWillAppear(animated: Bool) {}

self.view.backgroundColor = UIColor.blueColor)

self.webView.frame = CGRectMake (self.view.bounds.origin.x,

Self.View.Bounds.Origin.y + 50,

Self.View.Bounds.Size.Width,

Self.View.Bounds.Size.Height - 100)

super.viewWillAppear (animated);

}

/*

BRAND:-Navigation

In an application based on the table of Storyboard, you will often want to do a little preparation before navigation

Substitute variable func (segue: UIStoryboardSegue sender: AnyObject?) {

Download the new view controller using segue.destinationViewController.

Pass the object selected new view controller.

}

*/

}

Thank you Kerri!  I actually thought of doing just what you suggested as a last resort, but I managed to find discover the question late last night...

There is a plugin called cordova "statusbar-plugin-cordova", that once initialized resizes the image webview take full screen.  This only happens when you defined in the file config.xml for Web display.

If you delete the plugin (not really necessary for native applications hybrid anyway) or you turn off the "StatusBarOverlaysWebView" preference, then the plugin status bar will not resize itself your webview and the size that you set in "viewWillAppear" is respected and not replaced.  This should be changed in the documentation to gap of official telephone on the incorporation of the display of web pages.

Tags: PhoneGap

Similar Questions

  • How Phonegap support newly released Android/iOS versions?

    Hello

    I tried a few days find out this information. First of all, I'm a javascript developer, we try to work to find a solution to package our smartphone application of already built in a hybrid web and phonegap would be our choice.

    The problem is that we need to know/understand how Phonegap support newly released versions of Android/iOS. Meaning, for example, iOS 10 has just launched. Applications built with phonegap already working on it, or they will be soon? If newly released OS version comes with new features in their API, when will they support? I guess we could find plugins for it?

    I apologize in advance for my lack of knowledge about how applications are built for Android/iOS, native APIs, etc. As I said, I'm a frontend developer, but still learning on mobile and will get on that. Right now, I just need to understand things from above.

    Thank you!

    So far, the new features of the OS versions have always been supported sooner or later.

    In general, first Cordova then Phonegap and Phonegap Build releases a new version making apps for the new operating system platforms. In general, the first test is not the best, especially if something new in the config.xml file is needed. We've seen bugs introduced in such opportunities almost every time (like the iOS ShortVersionString, the Windows identity or preference for android-versionCode using Gradle) newly required.

    So yes, Phonegap will support new versions of the OS. Plugin authors usually catch up, too. But often, some period of time, usually several weeks until til two months, going on until things settle down after the release of a new version of the OS.

  • How can I remove a 10 iOS app? There is no mention that a menu

    How can I remove a 10 iOS app?

    All 10 iOS did when I press and hold, is to bring up a menu - which is a feature new, unexpected and undesirable new iOS operating system 10. This action is used to make the icons to move, I could press the "x" on the app, and it has been deleted. Now, I get a menu, without any option to delete.

    Help would be appreciated

    Post edited by: Grace Hope
    I just thought about it - you must maintain the App "slightly" and then move the icons, and you can press the 'x' to remove the application. If you push hard and here, the menu useless appears - lack of vision of Steve Jobs to Apple... he really wants this App menu? Without disabling option - the only thing I see is maybe turn off touch 3D, but I have not yet tried this plan.

    Tactile 3D power off will solve the problem. You can also try setting the sensitivity of touch 3D cabinet so that there is a major difference between a light and press tap. Tactile 3D can also just take some time to get used to. I struggled for the first week with building accidentally instead of tapping, but now I'm a pro at home. To access the tactile 3D settings, go to settings > general > accessibility > scroll to the 3D button.

  • How can I get the update iOS 9.3.5?

    How can I get the update iOS 9.3.5?

    Settings > general > software update

  • How to disable automatic updates of ios connected via wifi

    How to disable automatic updates of ios connected via wifi

    1. Open the settings app.
    2. Push App and iTunes Store.
    3. In the automatic downloads section, you will see an element called updates.
    4. Press the switch to turn it off
  • How can I disable the slide iOS 9 over "feature"?

    How can I disable the slide iOS 9 over "feature"? I continually, accidentally continues to activation of the slide feature, when I slide to the right. How can I activate the feature slide off that it's a constant nuisance?

    I had to use the iPad Guide to refresh my memory so I'll give you the quote.

    "Disable drag above. Go to settings > general > multitasking, and then disable allow multiple applications. »

    From: Apple Inc. "iPad for iOS 9.3 User Guide." Apple Inc., 2015. iBooks.

    These documents can be protected by copyright.

    Find this book on the iBook Store: https://itun.es/us/U4OT9.l

  • How can I download Hulu on iOS 5.1.1 ipad

    How can I download Hulu on iOS 5.1.1 iPad?

    Do it via iTunes. This is the way to access older versions of applications if they are still available.

    Connect your iPad to your computer and iTUnes. Then, through iTunes, go shopping in the app store and tries to download the application. It should prompt you to something along the line of ' the most recent version of this app is not compatible, click here to download a compatible version "or something along that line.

    It is possible that it is not a. 5.1.1 is 4 years old, so there may not be a version still available.

  • My wife made me an iPhone 5, but it doesn't have a sim. How can I find out what IOS is on the phone and sellers it work on?

    My wife made me an iPhone 5, but it doesn't have a sim. How can I find out what IOS is on the phone and sellers it work on?

    On the back it is marked A1429.

    Other Sim cards by train until one works, you will need to go to an Apple Retail Store or contact Apple Support and make them check the lock for you state.

    http://www.Apple.com/contact/

    For the iOS version, he will find in the Middle-> General-> about-> Version once the iPhone is fully active.

  • How to resize photos for export in the new photo software?

    When exporting photos to use for electronic mail, in iphotos, it was very simple resize (reduce quality or size). How I do in the new photo software?

    You should be able to use the Help Viewer in the Photos app for information

    How to resize or rotate an image. I haven't used an Apple photo app that much

    but know the preview application can resize or rotate an image, change the dimensions,

    do rotate/return the images, rotate/return several images, reduce the size of image file + change file type.

    • Preview (Yosemite): resize or rotate an image

    If Apple's Photo application should be these kinds of tools and the Help Viewer

    in the menu bar in the Photos is a place to enter 'resize or rotate an image' or research.

    Good luck & happy computing!

  • Cannot find how to install iPhoto om macbook IOS 10-7-5. New with apple

    Cannot find how to install iPhoto om macbook IOS 10-7-5.

    New with apple

    Have you bought your Mac of opportunity? A new mac should have with pre-installed iPhoto, if the Mac comes with Mac OS X 10.7.5.

    If the Mac initially had another system installed, look at the system installation discs, which belong to the Mac. On one of these disks should be an installer for iPhoto and other iLife applications.

    If the original system of the Mac is Mac OS X 10.7, there will be no installation disks.

    In this case look at the App Store, the fourth purchases tab, if you see iPhoto with a button I agree. Press this button.

    If iPhoto is not visible on the purchases tab, the previous owner has accepted the pre-installed iPhoto already to the AppleID and may not be transferred to you. You can buy your own copy.  Apple is no longer develops and sells iPhoto. Try buying an installer of iLife 11 on Amazon or eBay.

    iPhoto 11 works most completely, however. The functionality of the site is longer supported on the Mac OS compatible version X 10.7.5, because Apple has only the support of Google Maps.

    If your Mac is compatible, consider upgrading to Mac OS X 10.11. El Capitan and the use of the new Photos.app instead of buy a program that is no longer supported and developed.

    The Photos.app installs automatically, if you upgrade to El Capitan.

  • I downloaded a game on the internet, and now my screen does not match my screen. I have two large black areas on each side of my screen. How to resize my screen to fit the screen of my computer? (and yes I tried the button expand) :))

    I have two large black areas on each side of my screen. How to resize my screen to fit the screen of my computer? (and yes I tried the button expand) :))

    Hello val2000, welcome.

    These games is managed inside of Internet Explorer? If this isn't the case, then I suggest contacting the manufacturer of your computer for the latest pgrahics drivers. If installation of those who does not resolve the problem, then try to change your resolution to one of the following values (depending on the size of your screen):

    1024 x 768
    1280 x 800 (wide, common form for laptops)
    1280 x 1024
    1680 x 1050 (widescreen)

    To change your resolution:

    1. click on START
    2. click on "Control Panel."
    3. double click on "display".
    4. click on the tab "settings".
    5. change the resolution on your cursor tab and then click on 'Apply' at the bottom right

    Let us know what happens

    Thank you! Ryan Thieman
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How? Resize photos in the Gallery Windows without email?

    Hi all
    I need to know how to resize a photo in the Gallery Windows 1-4 (2). I want to keep this version of Windows. I don't want to send this picture. Rather, I need to resize the photo, save to my computer for later posting in a forum, I belong.
    The only option I see for resizing is in email. Ideas?
    Tina

    Hi all
    I need to know how to resize a photo in the Gallery Windows 1-4 (2). I want to keep this version of Windows. I don't want to send this picture. Rather, I need to resize the photo, save to my computer for later posting in a forum, I belong.
    The only option I see for resizing is in email. Ideas?
    Tina

    ==================================
    Maybe this article will be useful:

    Resizing Photos in Windows Live Photo Gallery

    If this is not the solution you ae looking for...
    the following free resizer might be worth a try:

    VSO Image Resizer
    http://www.VSO-Software.fr/products/image_resizer/

    VSO Image Resizer: tutorial
    How to resize my images and photos?
    http://www.VSO-Software.fr/products/image_resizer/how-to-compress-photos/how-to-resize-images-Guide.php

    John Inzer - MS - MVP - digital media experience

  • How to avoid the color address IOS in email HTML Template?

    Hello

    How to avoid the color address IOS in email HTML Template?

    Thank you

    Rahul Bhambri

    Hello Rahul,

    Please use css in your style sheet

    a {[x-Apple - detectors of data]

    color: inherit! important;

    text-decoration: none! important;

    font size: inherit! important;

    Police-family: inherit! important;

    Police-weight: inherit! important;

    line-height: inherit! important;

    }

    Thank you

    edynamic expert Eloqua

  • How to resize windows (vertical cracking)

    I do the "Text the Page Web Style" tutorial in Dreamweaver. He tells me: I styles.css showing in split view. Resize the code window so that all text in web design is to the left of the image of Saturn.              I see not the first a graph of Saturn, and how I resize the windows so that they are side by side?

    Thank you

    [edited by moderator subject line]

    Have you downloaded the example of the tutorial page files? It features the image of Saturn.

    To get the code side by side with the web page, select split vertically in the menu display of DW. You resize the windows by dragging the border between them.

  • How to resize a vector to insert in a template?

    Hello

    How you resize a vector to insert in a template? My vector image is too big for the place where I have to put in the template.

    Thank you for helping me.

    Annemarie

    There are many ways to resize your vector image. Once the image is selected, you can:

    (1) click and drag the scale tool (while holding down the SHIFT key to constrain the proportions)

    (2) click and drag on one of the handles of the framework encompassing (while holding down the SHIFT key to constrain the proportions)

    (3) type a new height or width in the range of transformation (ensuring that the proportion lock icon is selected)

    (4) a percentage scale determined with object > transform > scale

Maybe you are looking for