Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Fogh/AFWebViewController
In-app browser that uses WKWebView
https://github.com/Fogh/AFWebViewController
browser cocoapods hacktoberfest in-app ios objective-c pod webview
Last synced: 3 months ago
JSON representation
In-app browser that uses WKWebView
- Host: GitHub
- URL: https://github.com/Fogh/AFWebViewController
- Owner: Fogh
- License: mit
- Archived: true
- Created: 2014-11-10T19:20:04.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2020-10-09T19:03:48.000Z (over 4 years ago)
- Last Synced: 2024-10-07T00:01:09.344Z (4 months ago)
- Topics: browser, cocoapods, hacktoberfest, in-app, ios, objective-c, pod, webview
- Language: Objective-C
- Homepage:
- Size: 169 KB
- Stars: 40
- Watchers: 3
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
AFWebViewController
===================
![Pod version](http://img.shields.io/cocoapods/v/AFWebViewController.svg?style=flat)
![Pod platform](http://img.shields.io/cocoapods/p/AFWebViewController.svg?style=flat)
[![Build Status](http://img.shields.io/travis/Fogh/AFWebViewController.svg?style=flat)](https://travis-ci.org/Fogh/AFWebViewController)In-app browser
_**For apps targeting iOS 9 and greater you should be using [SFSafariViewController](https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller).**_
## Description
In-app browser for quick implementation in your app. Pretty much inspired by [`SVWebViewController`](https://github.com/TransitApp/SVWebViewController).
Uses [`WKWebView`](https://developer.apple.com/library/IOs/documentation/WebKit/Reference/WKWebView_Ref/index.html) for a much faster browsing experience.**Requires iOS 8+**
## Installation with [CocoaPods](http://cocoapods.org/)
Install with CocoaPods and import `AFWebViewController.h` or `AFModalWebViewController.h` where you want to use it.
### Podfile
```ruby
platform :ios, '8.0'
pod 'AFWebViewController', '~> 1.0'
```## Usage example
**Push `AFWebViewController`:**
```objectivec
AFWebViewController *webViewController = [AFWebViewController webViewControllerWithAddress:@"https://google.com"];
webViewController.toolbarTintColor = [UIColor orangeColor]; // Does not work on iPad
[self.navigationController pushViewController:webViewController animated:YES];
```**Modal `AFWebViewController`:**
```objectivec
AFModalWebViewController *webViewController = [AFModalWebViewController webViewControllerWithAddress:@"https://google.com"];
webViewController.barsTintColor = [UIColor redColor];
webViewController.toolbarTintColor = [UIColor orangeColor]; // Does not work on iPad
[self presentViewController:webViewController animated:YES completion:NULL];
``
## Other iOS open source projects by me- [AFAddressBookManager](https://github.com/Fogh/AFAddressBookManager)
- [AFMobilePayRequestHandler](https://github.com/Fogh/AFMobilePayRequestHandler)