Giter VIP home page Giter VIP logo

jbwebviewcontroller's Introduction

JBWebViewController

A drop-in Facebook inspired modal web browser.

JBWebViewController Screenshot

Video Demo

JBWebViewController Video Demo

Installation

CocoaPods

The recommended approach for installing JBWebViewController is through the package manager CocoaPods, which is widely used by iOS & Mac developers.

Simply add the following line to your Podfile:

pod "JBWebViewController"

Manual Install

Drag the JBWebViewController folder into your Xcode project, you may need to check the box "Copy items into destination group's folder (if needed)".

JBWebViewController needs the following third-party libraries:

Apps using JBWebViewController

Feel free to add your app to the list.

How to use

JBWebViewController is ment to be shown modally, which is recommended to be down with it's built in show functionality. Whilst not being recommended, it is however possible to present JBWebViewController outside a modal view controller. JBWebViewController should always be connected to a UINavigationController.

Presenting JBWebViewController

JBWebViewController *controller = [[JBWebViewController alloc] initWithUrl:[NSURL URLWithString:@"http://www.apple.com/iphone/"]];

[controller show];

Presenting JBWebViewController with block

JBWebViewController *controller = [[JBWebViewController alloc] initWithUrl:[NSURL URLWithString:@"http://www.apple.com/iphone/"]];

[controller showControllerWithCompletion:^(JBWebViewController *controller) {
    NSLog(@"Controller has arrived.");
}];

Localization

[controller setLoadingString:@"Chargement.."];

Navigate to URL

[controller navigateToURL:[NSURL URLWithString:@"http://www.apple.com/ios/"]];

Load custom NSURLRequest

NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://developer.apple.com/"]];
[controller loadRequest:request];

Reload current page

[controller reload];

Manually setting controller title

[controller setWebTitle:@"The quick brown fox"];

Getting controller title

NSString *controllerTitle = [controller getWebTitle];

Manually setting controller subtitle

[controller setWebSubtitle:@"foo bar"];

Getting controller subtitle

NSString *controllerSubtitle = [controller getWebSubtitle];

Hide URL

controller.hideAddressBar = YES;

Access UIWebView

The UIWebView used in the controller is now public.

UIWebView *webView;

Icons

Free icons by Icons8 under Creative Commons Attribution-NoDerivs 3.0 Unported.

Contact

Mention me on Twitter (@JonasBoserup) or email me (Profile).

License

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

jbwebviewcontroller's People

Contributors

bcylin avatar boserup avatar emilstahl avatar macromania avatar mj3052 avatar pavankris avatar ponf avatar

Watchers

 avatar  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.