Latest 0.0.4
Homepage https://github.com/dawnnnnn/DNWKWebViewController
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit, Foundation, WebKit
Authors

Version
License
Platform

DNWKWebViewController is a simple inline browser for your app.

This library is derived from SVWebViewController, which tries to build a webview controller with WKWebView.

DNWKWebViewController

DNWKWebViewController features:

  • iPhone and iPad distinct UIs
  • full landscape orientation support
  • back, forward, stop/refresh and share buttons
  • Open in Safari and Chrome UIActivities
  • navbar title set to the currently visible web page
  • talks with setNetworkActivityIndicatorVisible
  • propress view support

Installation

CocoaPods

platform :ios, '8.0'
pod 'DNWKWebViewController'

Manually

  • Drag the DNWKWebViewController/DNWKWebViewController folder into your project.
  • #import "DNWKWebViewController.h"

Usage

(see sample Xcode project in /Demo)

Just like any UIViewController, DNWKWebViewController can be pushed into a UINavigationController stack:

DNWKWebViewController *webViewController = [[DNWKWebViewController alloc] initWithAddress:@"http://oopser.com"];
[self.navigationController pushViewController:webViewController animated:YES];

DNWKWebViewControllerActivity

Starting in iOS 6 Apple uses UIActivity to let you show additional sharing methods in share sheets. DNWKWebViewController comes with "Open in Safari" and "Open in Chrome" activities. You can easily add your own activity by subclassing DNWKWebViewControllerActivity which takes care of a few things automatically for you. Have a look at the Safari and Chrome activities for implementation examples. Feel free to send it as a pull request once you’re done!

Change Log

  • 0.0.4 :
    • Fix bugs
  • 0.0.3 :
    • Fix bugs
    • update scroll decelerationRate
  • 0.0.2 :
    • Remove progressView when dealloc
  • 0.0.1 :
    • Released first version

License

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

Latest podspec

{
    "name": "DNWKWebViewController",
    "version": "0.0.4",
    "summary": "A simple inline browser for your iOS app",
    "description": "A simple inline browser for your iOS app.n- iPhone and iPad distinct UIsn- full landscape orientation supportn- back, forward, stop/refresh and share buttonsn- propress view support",
    "homepage": "https://github.com/dawnnnnn/DNWKWebViewController",
    "license": "MIT",
    "authors": {
        "dawnnnnn": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/dawnnnnn/DNWKWebViewController.git",
        "tag": "0.0.4"
    },
    "source_files": "DNWKWebViewController/**/*.{h,m}",
    "resources": "DNWKWebViewController/**/*.{bundle,png,lproj}",
    "frameworks": [
        "UIKit",
        "Foundation",
        "WebKit"
    ],
    "requires_arc": true
}

Pin It on Pinterest

Share This