Git Product home page Git Product logo

svwebviewcontroller's Introduction

SVWebViewController

SVWebViewController is a simple inline browser for your iOS 7 app.

SVWebViewController

SVWebViewController 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

Installation

CocoaPods

I'm not a big fan of CocoaPods, so tend to not keep it updated. If you really want to use SVWebViewController with CocoaPods, I suggest you use pod 'SVWebViewController', :head to pull from the master branch directly. I'm usually careful about what I push there and is the version I use myself in all my projects.

Manually

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

Usage

(see sample Xcode project in /Demo)

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

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

It can also be presented modally using SVModalWebViewController:

SVModalWebViewController *webViewController = [[SVModalWebViewController alloc] initWithAddress:@"http://google.com"];
[self presentViewController:webViewController animated:YES completion:NULL];

SVWebViewControllerActivity

Starting in iOS 6 Apple uses UIActivity to let you show additional sharing methods in share sheets. SVWebViewController comes with "Open in Safari" and "Open in Chrome" activities. You can easily add your own activity by subclassing SVWebViewControllerActivity 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!

Credits

SVWebViewController is brought to you by Sam Vermette and contributors to the project. If you have feature suggestions or bug reports, feel free to help out by sending pull requests or by creating new issues. If you're using SVWebViewController in your project, attribution is always appreciated.

svwebviewcontroller's People

Contributors

aburgel avatar alexruperez avatar bastos avatar bmichotte avatar d11wtq avatar filipbec avatar fogh avatar gabrielrinaldi avatar gcamp avatar jamesstout avatar johntmcintosh avatar matthewmayer avatar mshibanami avatar ngreenstein avatar olicarbo avatar oliverletterer avatar pushpak avatar samvermette avatar sandosh avatar smuellner avatar stevemoser avatar zzd258147 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.