Latest 0.5.0
Homepage https://github.com/sticksen/STKWebKitViewController
License MIT
Platforms ios , requires ARC
Frameworks UIKit, WebKit*
Authors

Version
License
Platform

STKWebKitViewController
STKWebKitViewController

Description

This project provides a wrapping UIViewController around Apple´s new WKWebView, available as of iOS8 in WebKit. Also included is a wrapping UINavigationController to present the WKWebView modally.

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

To push a WKWebView onto your UINavigationController, do:

NSURL *url = [NSURL URLWithString:@"https://github.com/sticksen/STKWebKitViewController"];
STKWebKitViewController *controller = [[STKWebKitViewController alloc] initWithURL:url];
[self.navigationController pushViewController:controller animated:YES];

To open it modally:

NSURL *url = [NSURL URLWithString:@"https://github.com/sticksen/STKWebKitViewController"];
STKWebKitModalViewController *controller = [[STKWebKitModalViewController alloc] initWithURL:url];
[self presentViewController:controller animated:YES completion:nil];

It is possible to change the behaviour how the WKWebView opens links that would trigger a new tab opening on desktop browsers (aka. target=_blank – links).
To change the behaviour, adjust newTabOpenMode to your desired choice.

It´s also possible to customize the NavigationBar and Toolbar colors.

To use the new UINavigationBar and UIToolbar hiding features of iOS8, set your navigationController to:

self.navigationController.hidesBarsOnSwipe = YES;

Requirements

WebKit, UIKit

Installation

STKWebKitViewController is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "STKWebKitViewController"

Then include the Header somewhere in your project:

#import <STKWebKitViewController/STKWebKitViewController.h>

Author

Marc, [email protected]

License

STKWebKitViewController is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "STKWebKitViewController",
    "version": "0.5.0",
    "summary": "Provides a wrapping UIViewController and UINavigationController for WKWebView",
    "description": "This project provides a wrapping UIViewController around Appleu00b4s new WKWebView, available as of iOS8 in WebKit. Also included is a wrapping UINavigationController to present the WKWebView modally.",
    "homepage": "https://github.com/sticksen/STKWebKitViewController",
    "screenshots": [
        "http://sticki.de/github/STKWebKitViewController/1.png",
        "http://sticki.de/github/STKWebKitViewController/2.png"
    ],
    "license": "MIT",
    "authors": {
        "Marc": "[email protected]"
    },
    "source": {
        "git": "https://github.com/sticksen/STKWebKitViewController.git",
        "tag": "0.5.0"
    },
    "social_media_url": "https://twitter.com/sticksen",
    "platforms": {
        "ios": null
    },
    "requires_arc": true,
    "source_files": "Pod/Classes",
    "resources": [
        "Pod/Assets/**/*.png"
    ],
    "frameworks": "UIKit",
    "weak_frameworks": "WebKit"
}

Pin It on Pinterest

Share This