Pawebview

An component WebView for iOS base on WKWebView
Alternatives To Pawebview
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Flutter_inappwebview2,70011282 days ago100June 12, 2023821apache-2.0Dart
A Flutter plugin that allows you to add an inline webview, to use a headless webview, and to open an in-app browser window.
Unity Webview2,062
11 days ago366zlibObjective-C++
Wkwebview848
7 years ago102Objective-C
DEPRECATED - this plugin served a purpose in the past, but there are better implementation now
Axwebviewcontroller745
84 years ago45February 22, 201848mitObjective-C
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.
React Native Wkwebview6324782 years ago30October 08, 201891mitObjective-C
WKWebview Component for React Native
Jxbwkwebview610
23 years ago14October 27, 20202mitObjective-C
An component WebView for iOS base on WKWebView
Kkjsbridge563
12 years ago39January 12, 202114mitObjective-C
一站式解决 WKWebView 支持离线包,Ajax/Fetch 请求,表单请求和 Cookie 同步的问题 (基于 Ajax Hook,Fetch Hook 和 Cookie Hook)
Cordova Plugin Ionic Webview4784,78779a month ago58May 27, 2020161apache-2.0Objective-C
Web View plugin for Cordova, specialized for Ionic apps.
Xwebview436
45 years ago9October 22, 201820apache-2.0Swift
An extensible WebView for iOS (based on WKWebView)
Ddgscreenshot358
2 years ago6October 22, 20187mitSwift
DDGScreenShot截屏图片处理,只需一句代码,复杂屏幕截屏(如view ScrollView webView wkwebView),图片后期处理,拼图,裁剪等
Alternatives To Pawebview
Select To Compare


Alternative Project Comparisons
Readme

PAWebView.

An component WebView for ios

Introduction

PAWeView is an extensible WebView which is built on top of WKWebView, the modern WebKit framework debuted in iOS 8.0. It provides fast Web for developing sophisticated iOS native or hybrid applications.

Sample Project

For a complete example on how to use PAWeView, see the Sample Project.

The Class Structure Chart of PAWeView

Image text

Minimum Requirements

  • Deployment: iOS 8.0

Usage

  • #import "PAWebView.h"
  • plist
     <key>UIViewControllerBasedStatusBarAppearance</key>
      <false/>
     <key>UIStatusBarStyle</key>
     <string>UIStatusBarStyleDefault</string>
     <key>NSPhotoLibraryUsageDescription</key>
     <string></string>
     <key>NSAppTransportSecurity</key>
     <dict>
      <key>NSAllowsArbitraryLoads</key>
      <true/>
     </dict>
    
  • Loading
    //  
     PAWebView *webView = [PAWebView shareInstance];  
     
    //  
    [webView loadRequestURL:[NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://www.sina.cn"] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:20.0f]];
     [self.navigationController pushViewController:webView animated:YES];
     
     // NSURLRequest 
    typedef NS_ENUM(NSUInteger, NSURLRequestCachePolicy)
    {
        NSURLRequestUseProtocolCachePolicy = 0, //
    
        NSURLRequestReloadIgnoringLocalCacheData = 1, //
        NSURLRequestReloadIgnoringLocalAndRemoteCacheData = 4, // Unimplemented
        NSURLRequestReloadIgnoringCacheData = NSURLRequestReloadIgnoringLocalCacheData,
    
        NSURLRequestReturnCacheDataElseLoad = 2,
        NSURLRequestReturnCacheDataDontLoad = 3,
    
        NSURLRequestReloadRevalidatingCacheData = 5, // Unimplemented
    };
     
    
  • Refress
 //  
  [webView reload];   
 //  
  [webView reloadFromOrigin]; 

  • JS->Native
/* messageHanderJSNative */  
- (void)addMessageHander  
{  
  // PAWKScriptMessageHandler   
   [webView addScriptMessageHandlerWithName:@[@"AliPay",@"weixin"]];  
 
  //block  
   [webView addScriptMessageHandlerWithName:@[@"AliPay",@"weixin"] observeValue:^(WKUserContentController *userContentController, WKScriptMessage *message) {  
     
      //JSOC  
      NSLog(@"name:%@;body:%@",message.name,message.body);  
   }];  
}  
 
/*  PAWKScriptMessageHandler  */  
- (void)PAUserContentController: (WKUserContentController *) userContentController  didReceiveScriptMessage:(WKScriptMessage *)message{  
 
      //JSOC   
       NSLog(@"name:%@;body:%@",message.name,message.body);  
} 
  • Native -> JS
 //  
  [[PAWebView shareInstance] callJS:@"alert('JS')"];  
 //  
  [[PAWebView shareInstance] callJS:@"alert('JS')" handler:^(id response, NSError *error) {  
       NSLog(@"js");  
  }]; 
  • Cooikes Manager
/**
 cookiesWKWebviewcookiessharedHTTPCookieStoragecookies

@return cookies
 iOS11 cookies NSHTTPCookieStoragecookiesiOS11cookies 
*/
- (NSMutableArray *)WKSharedHTTPCookieStorage;

/**
 cookiesloadRequest 

@param cookie NSHTTPCookie 
 cookie  cookie namevaluedomainexpiresDatecookie
 cookie expiresDate [cookieProperties setObject:expiresDate forKey:NSHTTPCookieExpires]; cookieProperties[expiresDate] = expiresDate; cookies 
*/
- (void)setCookie:(NSHTTPCookie *)cookie;

/** cookie */
- (void)deleteWKCookie:(NSHTTPCookie *)cookie completionHandler:(nullable void (^)(void))completionHandler;
/** cookie */
- (void)deleteWKCookiesByHost:(NSURL *)host completionHandler:(nullable void (^)(void))completionHandler;

/** cookies */
- (void)clearWKCookies;


/** cookie */
- (void)clearWebCacheFinish:(void(^)(BOOL finish,NSError *error))block;

  • backForwardList
/*backForwardList */
- (void)clearBackForwardList;

Popular Wkwebview Projects
Popular Webview Projects
Popular User Interface Components Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Javascript
Webview
Webkit
Plist
Wkwebview