Latest 1.3.9
Homepage https://github.com/dfmuir/KINWebBrowser
License MIT
Platforms ios 7.0, requires ARC
Dependencies TUSafariActivity, ARChromeActivity
Authors

KINWebBrowser

KINWebBrowser is a web browser module for your apps.

Powered by WKWebView on iOS 8. Backwards compatible with iOS 7 using UIWebView.

KINWebBrowser Screenshots

Features

  • iOS 7 & 8 support for iPhone and iPad devices
  • Safari-like interface
  • Animated progress bar
  • Customizable UI including tint color
  • Portrait and landscape orientation support
  • Use with existing UINavigationController or present modally
  • Delegate protocol for status callbacks
  • Action button to allow users to copy URL, share, or open in Safari & Google Chrome
  • Supports subclassing
  • Installation with CocoaPods

Overview

KINWebBrowser consists of a single component:

KINWebBrowserViewController – a UIViewController that contains a full featured web browser.

KINWebBrowserViewController must be contained in a UINavigationController.

Pushing to the navigation stack:

KINWebBrowserViewController *webBrowser = [KINWebBrowserViewController webBrowser];
[self.navigationController pushViewController:webBrowser animated:YES];
[webBrowser loadURLString:@"http://www.example.com"];

Presenting Modally:

UINavigationController *webBrowserNavigationController = [KINWebBrowserViewController navigationControllerWithWebBrowser];
[self presentViewController:webBrowserNavigationController animated:YES completion:nil];

KINWebBrowserViewController *webBrowser = [webBrowserNavigationController rootWebBrowser];
[webBrowser loadURLString:@"http://www.example.com"];

Installation

CocoaPods

CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries in your projects. See the "Getting Started" for more information.

Podfile
platform :ios, '7.0'
pod 'KINWebBrowser'

Dependencies

These dependency projects should be also installed with KINWebBrowser. They are installed automatically when installing KINWebBrowser with CocoaPods.

  • TUSafariActivity – a UIActivity subclass that provides an "Open In Safari" action to a UIActivityViewController
  • ARChromeActivity – a UIActivity subclass that provides an "Open In Google Chrome" action to a UIActivityViewController

Customizing the User Interface

Tint Color

The tint color of the toolbars and toolbar items can be customized.

webBrowser.tintColor = [UIColor blueColor];
webBrowser.barTintColor = [UIColor blackColor];

Title Bar Content

The URL can be shown in the UINavigationBar while loading. The title of the page can be shown when loading completes.

webBrowser.showsURLInNavigationBar = NO;
webBrowser.showsPageTitleInNavigationBar = YES;

Implementing KINWebBrowserDelegate Protocol

KINWebBrowserDelegate is a set of @optional callback methods to inform the delegate of status changes.

- (void)webBrowser:(KINWebBrowserViewController *)webBrowser didStartLoadingURL:(NSURL *)URL;
- (void)webBrowser:(KINWebBrowserViewController *)webBrowser didFinishLoadingURL:(NSURL *)URL;
- (void)webBrowser:(KINWebBrowserViewController *)webBrowser didFailToLoadURL:(NSURL *)URL withError:(NSError *)error;

Latest podspec

{
    "name": "KINWebBrowser_fm",
    "version": "1.3.9",
    "summary": "A web browser module for your apps.",
    "description": "KINWebBrowser is a web browser module for your apps. Powered by WKWebView on iOS 8. Backwards compatible with iOS 7 using UIWebView. KINWebBrowser offers the simplest way to add a web browser to your apps.",
    "homepage": "https://github.com/dfmuir/KINWebBrowser",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "David F. Muir V": "[email protected]"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/lexiaoyao20/KINWebBrowser.git",
        "tag": "1.3.9"
    },
    "source_files": [
        "KINWebBrowser",
        "KINWebBrowser/**/*.{h,m}"
    ],
    "resource_bundles": {
        "KINWebBrowser": [
            "Assets/*.png"
        ]
    },
    "requires_arc": true,
    "weak_frameworks": "WebKit",
    "dependencies": {
        "TUSafariActivity": [
            "1.0.4"
        ],
        "ARChromeActivity": [
            "1.0.5"
        ]
    }
}

Pin It on Pinterest

Share This