Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

Commit

Permalink
Merge pull request #263 from Telerik-Verified-Plugins/tpopov/update-f…
Browse files Browse the repository at this point in the history
…rame

Update web view frame when super view changes its size.
  • Loading branch information
EddyVerbruggen authored Nov 22, 2016
2 parents 8c149f3 + a9d1227 commit 427778f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.6.9",
"version": "0.6.10",
"name": "cordova-plugin-wkwebview",
"cordova_name": "WKWebView Polyfill",
"description": "A drop-in replacement of UIWebView for boosted performance and enhanced HTML5 support",
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
id="com.telerik.plugins.wkwebview"
version="0.6.9">
version="0.6.10">

<name>WKWebView Polyfill</name>

Expand Down
12 changes: 12 additions & 0 deletions src/ios/MyMainViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,18 @@ - (void)copyLocalStorageToUIWebView:(NSNotification*)notification {
}
}

#pragma mark View Rotation Event Handling

- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator
{
[super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];

[coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> context) {
self.wkWebView.frame = self.view.bounds;
[self.wkWebView layoutIfNeeded];
} completion:nil];
}

#pragma mark View lifecycle

- (void)createGapView:(WKWebViewConfiguration*) config
Expand Down

0 comments on commit 427778f

Please sign in to comment.