TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | Custom |
ReleasedLast Release | Dec 2014 |
Maintained by Nolan Waite.
Yet Another Browser View Controller.
We've all written these things a million times. Here's another one.
You're tired of, or want a head start on, rewriting a little skin over a web view so that people don't get punted out to Safari just to open a website. And you want WKWebView
's power while mitigating its deficiencies.
You want third-party code to permanently mess with your navigation bars. You love undocumented Key-Value Observing usage. You'd like a bunch of other dependencies to be pulled in. You need NSHTTPCookieStorage
, NSURLCache
, NSURLProtocol
, access to folders that aren't tmp
, state-preserved URL history, or something else that WKWebView
doesn't care for.
YABrowserViewController supports iOS 8.0+.
You have options:
YABrowserViewController.xcodeproj
into your project, add YABrowserViewController
as a Target Dependency, then add YABrowserViewController.framework
to your Embedded Binaries, then @import YABrowserViewController;
or import YABrowserViewController
as necessary. (This is how the included sample app is configured, if you need inspiration.)YABrowserViewController.h
and YABrowserViewController.m
into your project, along with the Images
folder.pod 'YABrowserViewController'
github "nolanw/YABrowserViewController"
let browser = YABrowserViewController()
browser.URLString = "https://github.com/nolanw/YABrowserViewController"
browser.presentFromViewController(self, animated: true, completion: nil)
Customization isn't YABrowserViewController's strong suit, in that it doesn't really do very much. There aren't any knobs to dial. Instead, you can just set the view controller and navigation controller properties yourself to do whatever you like. Or copy the files over and edit them to suit your needs.
For example, there's a little convenience method there, -presentFromViewController:animated:completion:
, for modal presentation. Not enough? Toss a category on YABrowserViewController
and set up a UINavigationController
however you please!
If you'd like to poke around, see the SampleBrowser app. It has UIKit state preservation and restoration enabled, so you can test that out.
No shortage of these.
YABrowserViewController is by Nolan Waite.
Public domain.