stk

STKWebKitViewController

Usable UI around WKWebView

Showing:

Popularity

Downloads/wk

0

GitHub Stars

147

Maintenance

Last Commit

5yrs ago

Contributors

7

Package

Dependencies

0

License

MIT

Categories

Readme

STKWebKitViewController

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, sticki@sticki.de

License

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

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100