All Projects → kylehickinson → Swiftui Webview

kylehickinson / Swiftui Webview

Licence: unlicense
A SwiftUI component to use WKWebView

Programming Languages

swift
15916 projects

Labels

Projects that are alternatives of or similar to Swiftui Webview

Wkwebview
WKWebView的使用、JS和OC的交互、网页内容加载进度条的实现、WKWebView+UITableView混排 、 WKWebView离线缓存
Stars: ✭ 366 (+131.65%)
Mutual labels:  wkwebview
Wkwebviewjavascriptbridge
🌉 A Bridge for Sending Messages between Swift and JavaScript in WKWebViews.
Stars: ✭ 863 (+446.2%)
Mutual labels:  wkwebview
Mybrowser
我的浏览器,基于WKWebView实现的一个iOS浏览器,实现了无图模式、广告拦截、多窗口、扫描二维码、收藏夹/历史、无痕浏览、夜间模式等功能...
Stars: ✭ 127 (-19.62%)
Mutual labels:  wkwebview
Xwebview
An extensible WebView for iOS (based on WKWebView)
Stars: ✭ 442 (+179.75%)
Mutual labels:  wkwebview
Tysnapshotscroll
一句代码保存截图,将 UIScrollView UITableView UICollectionView UIWebView WKWebView 网页 保存 为 长图 查看。Save the scroll view page as an image,support UIScrollView,UITableView,UICollectionView,UIWebView,WKWebView.(Support iOS13)
Stars: ✭ 709 (+348.73%)
Mutual labels:  wkwebview
Reusablenestingscrollview
An scrollView handler for UIScrollView & WKWebView and other scrollViews. Providing scrollview`s subViews reusable.
Stars: ✭ 61 (-61.39%)
Mutual labels:  wkwebview
cordova-plugin-wkwebview-inject-cookie
Injects a cookie in order to start the sync processs with wkWebView
Stars: ✭ 43 (-72.78%)
Mutual labels:  wkwebview
Flwebview
WKWebView with UIWebView fallback for iOS.
Stars: ✭ 145 (-8.23%)
Mutual labels:  wkwebview
Ios tips
iOS的一些示例,持续更新中:1、AVFoundation 高仿微信相机拍摄和编辑 2、AVFoundation 人脸检测、实时滤镜、音视频编解码、GPUImage框架的使用等音视频相关内容 3、OpenGLES 4、LeetCode算法练习 5、iOS Crash防护和APM监控 6、WKWebView相关的内容 等........
Stars: ✭ 896 (+467.09%)
Mutual labels:  wkwebview
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 (-46.2%)
Mutual labels:  wkwebview
Kkjsbridge
一站式解决 WKWebView 支持离线包,Ajax/Fetch 请求,表单请求和 Cookie 同步的问题 (基于 Ajax Hook,Fetch Hook 和 Cookie Hook)
Stars: ✭ 462 (+192.41%)
Mutual labels:  wkwebview
Jxbwkwebview
An component WebView for iOS base on WKWebView
Stars: ✭ 646 (+308.86%)
Mutual labels:  wkwebview
Youtubeplayerview
Helper library for iOS developers that want to embed YouTube videos in their iOS apps with the iframe player API. 📹
Stars: ✭ 72 (-54.43%)
Mutual labels:  wkwebview
Marionette
🧸 Swift library which provides a high-level API to control a WKWebView
Stars: ✭ 374 (+136.71%)
Mutual labels:  wkwebview
Ionic Native Http Connection Backend
A solution to CORS issues with Ionic and iOS
Stars: ✭ 142 (-10.13%)
Mutual labels:  wkwebview
Macpin
a webapp container & site specific browser made from WebKit.swift and JavaScriptCore
Stars: ✭ 289 (+82.91%)
Mutual labels:  wkwebview
Hybridpagekit
A high-performance、high-extensibility、easy integration framework for Hybrid content page. Support most content page types of News App.
Stars: ✭ 1,101 (+596.84%)
Mutual labels:  wkwebview
Applemusicultra
Music Client for macOS. Upgrade your music experience with themes, styles, custom scripting and more. Uses WebKit and JavaScript.
Stars: ✭ 155 (-1.9%)
Mutual labels:  wkwebview
Lcwebview
www.strictfrog.com
Stars: ✭ 144 (-8.86%)
Mutual labels:  wkwebview
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 (+696.84%)
Mutual labels:  wkwebview

WebView

A SwiftUI component View that contains a WKWebView

Since WKWebView handles a lot of its own state, navigation stack, etc, it's almost easier to treat it as a mutable data model. You can set it up prior to how you need it, and then simply use its data within your SwiftUI View's.

Simply spin up a WebViewStore (optionally with your own WKWebView) and use that to access the WKWebView itself as if it was a data model.

Example usage:

import SwiftUI
import WebView

struct ContentView: View {
  @StateObject var webViewStore = WebViewStore()
  
  var body: some View {
    NavigationView {
      WebView(webView: webViewStore.webView)
        .navigationBarTitle(Text(verbatim: webViewStore.title ?? ""), displayMode: .inline)
        .navigationBarItems(trailing: HStack {
          Button(action: goBack) {
            Image(systemName: "chevron.left")
              .imageScale(.large)
              .aspectRatio(contentMode: .fit)
              .frame(width: 32, height: 32)
          }.disabled(!webViewStore.canGoBack)
          Button(action: goForward) {
            Image(systemName: "chevron.right")
              .imageScale(.large)
              .aspectRatio(contentMode: .fit)
              .frame(width: 32, height: 32)
          }.disabled(!webViewStore.canGoForward)
        })
    }.onAppear {
      self.webViewStore.webView.load(URLRequest(url: URL(string: "https://apple.com")!))
    }
  }
  
  func goBack() {
    webViewStore.webView.goBack()
  }
  
  func goForward() {
    webViewStore.webView.goForward()
  }
}
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].