Coder Social home page Coder Social logo

kinwebbrowser's Introduction

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 rootWebBrowserViewController];
[webBrowser loadURLString:@"http://www.example.com"];

Installation With 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'

Customizing the User Interface

Tint Color

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

webBrowserViewController.tintColor = [UIColor blueColor];
webBrowserViewController.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.

webBrowserViewController.showsURLInNavigationBar = NO;
webBrowserViewController.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;

kinwebbrowser's People

Contributors

dfmuir avatar toto avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.