<commit_before># TOWebViewController
### An Inline Web Browser for iOS Apps

![TOCropViewController](Screenshots/TOWebViewController-2015.jpg)

[![CI Status](http://img.shields.io/travis/TimOliver/TOWebViewController.svg?style=flat)](http://api.travis-ci.org/TimOliver/TOWebViewController.svg)
[![Version](https://img.shields.io/cocoapods/v/TOWebViewController.svg?style=flat)](http://cocoadocs.org/docsets/TOWebViewController)
[![License](https://img.shields.io/cocoapods/l/TOWebViewController.svg?style=flat)](http://cocoadocs.org/docsets/TOWebViewController)
[![Platform](https://img.shields.io/cocoapods/p/TOWebViewController.svg?style=flat)](http://cocoadocs.org/docsets/TOWebViewController)

`TOWebViewController` is an open-source `UIViewController` subclass designed to let apps quickly present web page content to its users, without needing to kick them over to Safari. `TOWebViewController` has been designed from the ground up to be easily integrated into existing projects, to take advantage of the latest features of iOS, and to optionally be backwards compatible with (significantly) earlier versions of iOS.

## Features
* Powered by `UIWebView`, backwards compatible down to iOS 5.
* Full navigation buttons set, including back, forward, refresh and an optional share/action button.
* Detects whether being pushed modally, or via a navigation controller and adjusts the UI accordingly.
* A page load progress bar  (using [ninjinkun's amazing algorithm](https://github.com/ninjinkun/NJKWebViewProgress)).
* Plays a smooth, elegant rotation animation if/when the user rotates the device.
* Icons are procedurally generated by CoreGraphics (ie, no unnecessary image assets at all!).
* Compatible with iOS 8 size classes, including split-screen on iPad Air 2, iPad mini 4 and iPad Pro.
* 1Password automatic password input extension support.
* **(TODO)** Reimplement the popup that appears when users tap and hold a link for added flexibility.
* **(TODO)** An optional text field for which users may manually enter in a URL.
* **(TODO)** A proper delegate system to allow external classes to interact with this controller.
* **(TODO)** A rudimentary bookmark saving and retrieval system.
* **(TODO)** Basic navigation history that displays when long-pressing the back/forward buttons.
* **(TODO)** A proper 'Error Occurred/Not connected to the internet' dialog view.

## Example
`TOWebViewController` is smart enough to be able to tell when it's being presented as a modal popup, and when it's being pushed onto a `UINavigationController` and to change its button layout accordingly. 

### Presenting as a Modal Dialog

When presenting as a modal popup, it is still necessary to create a parent `UINavigationController` in order for the buttons to display properly:

```objc
TOWebViewController *webViewController = [[TOWebViewController alloc] initWithURL:[NSURL URLWithString:@"http://www.apple.com/"];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:webViewController];
[self presentViewController:navigationController animated:YES completion:nil];
```

### Pushing onto a `UINavigationController`
```objc
TOWebViewController *webViewController = [[TOWebViewController alloc] initWithURL:[NSURL URLWithString:@"http://www.apple.com/"];
[self.navigationController pushViewController:webViewController animated:YES];
```

## System Requirements
iOS 5.0 or above

## Installation

#### As a Cocoapods Dependency

Add the following to your Podfile:
``` ruby
pod 'TOWebViewController'
```
<commit_msg>Fixed typo.<commit_after># TOWebViewController
### An Inline Web Browser for iOS Apps

![TOCropViewController](Screenshots/TOWebViewController-2015.jpg)

[![CI Status](http://img.shields.io/travis/TimOliver/TOWebViewController.svg?style=flat)](http://api.travis-ci.org/TimOliver/TOWebViewController.svg)
[![Version](https://img.shields.io/cocoapods/v/TOWebViewController.svg?style=flat)](http://cocoadocs.org/docsets/TOWebViewController)
[![License](https://img.shields.io/cocoapods/l/TOWebViewController.svg?style=flat)](http://cocoadocs.org/docsets/TOWebViewController)
[![Platform](https://img.shields.io/cocoapods/p/TOWebViewController.svg?style=flat)](http://cocoadocs.org/docsets/TOWebViewController)

`TOWebViewController` is an open-source `UIViewController` subclass designed to let apps quickly present web page content to its users, without needing to kick them over to Safari. `TOWebViewController` has been designed from the ground up to be easily integrated into existing projects, to take advantage of the latest features of iOS, and to optionally be backwards compatible with (significantly) earlier versions of iOS.

## Features
* Powered by `UIWebView`, backwards compatible down to iOS 5.
* Full navigation buttons set, including back, forward, refresh and an optional share/action button.
* Detects whether being pushed modally, or via a navigation controller and adjusts the UI accordingly.
* A page load progress bar  (using [ninjinkun's amazing algorithm](https://github.com/ninjinkun/NJKWebViewProgress)).
* Plays a smooth, elegant rotation animation if/when the user rotates the device.
* Icons are procedurally generated by CoreGraphics (ie, no unnecessary image assets at all!).
* Compatible with iOS 8 size classes, including split-screen on iPad Air 2, iPad mini 4 and iPad Pro.
* 1Password automatic password input extension support.
* **(TODO)** Reimplement the popup that appears when users tap and hold a link for added flexibility.
* **(TODO)** An optional text field for which users may manually enter in a URL.
* **(TODO)** A proper delegate system to allow external classes to interact with this controller.
* **(TODO)** A rudimentary bookmark saving and retrieval system.
* **(TODO)** Basic navigation history that displays when long-pressing the back/forward buttons.
* **(TODO)** A proper 'Error Occurred/Not connected to the internet' dialog view.

## Example
`TOWebViewController` is smart enough to be able to tell when it's being presented as a modal popup, and when it's being pushed onto a `UINavigationController` and to change its button layout accordingly. 

### Presenting as a Modal Dialog

When presenting as a modal popup, it is still necessary to create a parent `UINavigationController` in order for the buttons to display properly:

```objc
TOWebViewController *webViewController = [[TOWebViewController alloc] initWithURL:[NSURL URLWithString:@"http://www.apple.com/"]];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:webViewController];
[self presentViewController:navigationController animated:YES completion:nil];
```

### Pushing onto a `UINavigationController`
```objc
TOWebViewController *webViewController = [[TOWebViewController alloc] initWithURL:[NSURL URLWithString:@"http://www.apple.com/"]];
[self.navigationController pushViewController:webViewController animated:YES];
```

## System Requirements
iOS 5.0 or above

## Installation

#### As a Cocoapods Dependency

Add the following to your Podfile:
``` ruby
pod 'TOWebViewController'
```

{'fraction_non_alphanumeric': 0.09764639955169516, 'fraction_numerical': 0.0030820958251611096, 'mean_word_length': 6.1034825870646765, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3240932', 'n_tokens_mistral': 2027, 'n_tokens_neox': 1830, 'n_words': 717}