All Projects → meismyles → Swiftwebvc

meismyles / Swiftwebvc

Licence: mit
A drop-in inline browser for your Swift iOS app.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Swiftwebvc

Parser Javascript
Browser sniffing gone too far — A useragent parser library for JavaScript
Stars: ✭ 66 (-78.5%)
Mutual labels:  webview, browser
Cargo
🚂🚋🚋 A browser with almost no UI.
Stars: ✭ 221 (-28.01%)
Mutual labels:  webview, browser
Flutter inappwebview
A Flutter plugin that allows you to add an inline webview, to use a headless webview, and to open an in-app browser window.
Stars: ✭ 1,259 (+310.1%)
Mutual labels:  webview, browser
Axwebviewcontroller
AXWebViewController is a webViewController to browse web content inside applications. It’s a lightweight controller on iOS platform based on WKWebView (UIWebView would be the base Kit under iOS 8.0). It added navigation tool bar to refresh, go back, go forward and so on. It support the navigation style on WeChat. It is a simple-using and convenient web view controller using inside applications.
Stars: ✭ 770 (+150.81%)
Mutual labels:  cocoapods, webview
Flutter browser app
A Full-Featured Mobile Browser App (such as the Google Chrome mobile browser) created using Flutter and the features offered by the flutter_inappwebview plugin.
Stars: ✭ 85 (-72.31%)
Mutual labels:  webview, browser
Hxphotopicker
图片/视频选择器 - 支持LivePhoto、GIF图片选择、3DTouch预览、在线下载iCloud上的资源、编辑图片/视频、浏览网络图片 功能 Imitation wx photo/image picker - support for LivePhoto, GIF image selection, 3DTouch preview, Download the resources on iCloud online, browse the web image function
Stars: ✭ 2,363 (+669.71%)
Mutual labels:  cocoapods, browser
Luminous
Luminous provides you a lot of information about the system and a lot of handy methods to quickly get useful data on the iOS platform.
Stars: ✭ 298 (-2.93%)
Mutual labels:  cocoapods
Standardized Audio Context
A cross-browser wrapper for the Web Audio API which aims to closely follow the standard.
Stars: ✭ 300 (-2.28%)
Mutual labels:  browser
Web3.swift
A pure swift Ethereum Web3 library
Stars: ✭ 295 (-3.91%)
Mutual labels:  cocoapods
Netfox
A lightweight, one line setup, iOS / OSX network debugging library! 🦊
Stars: ✭ 3,188 (+938.44%)
Mutual labels:  cocoapods
Glnotificationbar
GLNotificationBar is a ios10 style notification bar, can be used to handle push notification in active state.
Stars: ✭ 306 (-0.33%)
Mutual labels:  cocoapods
Singlefile
Web Extension for Firefox/Chrome/MS Edge and CLI tool to save a faithful copy of an entire web page in a single HTML file
Stars: ✭ 4,417 (+1338.76%)
Mutual labels:  browser
Wordpress Ios
WordPress for iOS - Official repository
Stars: ✭ 3,239 (+955.05%)
Mutual labels:  cocoapods
Ismessages
This is simple extension for presenting system-wide notifications from top/bottom of device screen.
Stars: ✭ 299 (-2.61%)
Mutual labels:  cocoapods
Lthradiobutton
A radio button with a pretty animation
Stars: ✭ 303 (-1.3%)
Mutual labels:  cocoapods
Anyformatkit
Simple text formatting in Swift
Stars: ✭ 296 (-3.58%)
Mutual labels:  cocoapods
Xlactioncontroller
Fully customizable and extensible action sheet controller written in Swift
Stars: ✭ 3,228 (+951.47%)
Mutual labels:  cocoapods
Attributedstring
基于Swift插值方式优雅的构建富文本, 支持点击长按事件, 支持不同类型过滤, 支持自定义视图等.
Stars: ✭ 294 (-4.23%)
Mutual labels:  cocoapods
Stevia
🍃 Concise Autolayout code
Stars: ✭ 3,182 (+936.48%)
Mutual labels:  cocoapods
Evt
💧EventEmitter's typesafe replacement
Stars: ✭ 305 (-0.65%)
Mutual labels:  browser

SwiftWebVC

SwiftWebVC is a simple inline browser for your Swift iOS app.

SwiftWebVC

SwiftWebVC 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
  • 3 different themes to choose from when presented modally

SwiftWebVC

Installation

CocoaPods

  • SwiftWebVC is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'SwiftWebVC'

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate SwiftWebVC into your Xcode project using Carthage, specify it in your Cartfile:

github "meismyles/SwiftWebVC"

Run carthage update to build the framework and drag the built SwiftWebVC.framework into your Xcode project.

Manual

  • Add the SwiftWebVC/ folder into your project.

Usage

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

let webVC = SwiftWebVC(urlString: "http://google.com")
self.navigationController?.pushViewController(webVC, animated: true)

It can be presented modally using SwiftModalWebVC:

let webVC = SwiftModalWebVC(urlString: "http://google.com")
self.present(webVC, animated: true, completion: nil)

Options

The share button can be disabled by passing a flag in to the constructor to specify this:

let webVC = SwiftWebVC(urlString: "http://google.com", sharingEnabled: false)

The same principal applies for the modal implementation also:

let webVC = SwiftModalWebVC(urlString: "http://google.com", sharingEnabled: false)

Modal Options Only

Themes may be chosen for the modal implementation. The default theme is Light-Blue. Other modal themes Light-Black and Dark may be chosen using one of the following instead:

let webVC = SwiftModalWebVC(urlString: "http://google.com", theme: .lightBlack)
let webVC = SwiftModalWebVC(urlString: "http://google.com", theme: .dark)

Delegate (Start/Finish Loading Callbacks)

SwiftWebVC also includes a delegate protocol that allows you to implement didStartLoading and didFinishLoading functions to determine when loading starts and finishes.

Note: This is currently only implemented for SwiftWebVC, not SwiftModalWebVC.

To implement this, after declaring your instance of SwiftWebVC, set it's delegate and implement the callback functions. For example:

Inititalisation

let webVC = SwiftWebVC(urlString: "https://www.google.com")
webVC.delegate = self
self.navigationController?.pushViewController(webVC, animated: true)

Delegate Implementation

extension ViewController: SwiftWebVCDelegate {
    
    func didStartLoading() {
        print("Started loading.")
    }
    
    func didFinishLoading(success: Bool) {
        print("Finished loading. Success: \(success).")
    }
}

SwiftWebVCActivity

Starting in iOS 6 Apple uses UIActivity to let you show additional sharing methods in share sheets. SwiftWebVC comes with "Open in Safari" and "Open in Chrome" activities. You can easily add your own activity by subclassing SwiftWebVCActivity which takes care of a few things automatically for you. Have a look at the Safari and Chrome activities for implementation examples.Typed

Credits

SwiftWebVC is a Swift implementation of Sam Vermette's SVWebViewController. Code transcription, updates and changes were carried out by Myles Ringle. The original SVWebViewController was 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 SwiftWebVC in your project, attribution is always appreciated.

Thanks to Icons8 for the images.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].