Latest 1.0
Homepage https://github.com/freak4pc/UIWebView-Blocks
License MIT
Platforms ios , requires ARC
Authors

no README.md available

Latest podspec

{
    "name": "UIWebView-Blocks",
    "version": "1.0",
    "summary": "UIWebView+Blocks is A simple category that implements blocks into UIWebView.",
    "description": "                tUIWebView-Blocksn                  ================nn                  UIWebView+Blocks is A simple category that implements blocks into UIWebView.n                  This allows you to use the power of blocks instead of implementing a delegate.nn                  USAGE FOR NSURLRequestsn                  ------nn                  Instead of allocating a new UIWebView and assigning a delegate, just call one of the static methods:nn                  ```objcn                  UIWebView *webView = [UIWebView loadRequest:[NSURLRequest requestWithURL: [NSURL URLWithString:@"http://google.com"]]n                                                       loaded:^(UIWebView *webView) {n                                                           NSLog(@"Loaded successfully");n                                                       }n                                                       failed:^(UIWebView *webView, NSError *error) {n                                                           NSLog(@"Failed loading %@", error);n                                                       }];n                  ```nn                  **OR**nn                  ```objcn                  UIWebView *webView = [UIWebView loadRequest:[NSURLRequest requestWithURL: [NSURL URLWithString:@"http://google.com"]]n                                                       loaded:^(UIWebView *webView) {n                                                           NSLog(@"Loaded successfully");n                                                       }n                                                       failed:^(UIWebView *webView, NSError *error) {n                                                           NSLog(@"Failed loading %@", error);n                                                       }n                                                  loadStarted:^(UIWebView *webView) {n                                                      NSLog(@"Started loading %@", webView.request.URL.absoluteString);n                                                  }n                                                   shouldLoad:^BOOL(UIWebView *webView, UIWebViewNavigationType navigationType) {n                                                       return YES;n                                                   }];n                  ```nn                  USAGE FOR HTML Stringsn                  -------nn                  ```objcn                  UIWebView *webView = [UIWebView loadHTMLString:htmlStringn                                                          loaded:^(UIWebView *) {n                                                              NSLog(@"Loaded successfully");n                                                          }n                                                          failed:^(UIWebView *, NSError *) {n                                                               NSLog(@"Failed loading %@", error);n                                                          }];n                  ```nn                  **OR**nn                  ```objcn                  UIWebView *webView = [UIWebView loadHTMLString:htmlStringn                                                          loaded:^(UIWebView *) {n                                                              NSLog(@"Loaded successfully");n                                                          }n                                                          failed:^(UIWebView *, NSError *) {n                                                               NSLog(@"Failed loading %@", error);n                                                          }n                                                     loadStarted:^(UIWebView *webView) {n                                                         NSLog(@"Started loading %@", webView.request.URL.absoluteString);n                                                     }n                                                      shouldLoad:^BOOL(UIWebView *webView, NSURLRequest *request, UIWebViewNavigationType navigationType) {n                                                          return YES;n                                                      }];n                  ```nnn                  The class will return the UIWebView object which you can later add as a subview to your current view.nn                  ```objcn                  webView.frame = [[UIScreen mainScreen] bounds];n                  [self.view addSubview: webView];n                  ```nnn                  ***Note:*** UIWebView+Blocks currently doesn't support the simultaneous usage of multiple UIWebViews in the same view.nn                  TRUE ENDING REPORTINGn                  ---------------------nn                  In UIWebView+Blocks.h, set `TRUE_END_REPORT` to YES if you wish to get notified only when the page is fully loaded instead of being notified every time a resource is loaded (default UIWebViewDelegate behavior).n                  This feature is still under beta and might not work perfectly at all times.  n",
    "homepage": "https://github.com/freak4pc/UIWebView-Blocks",
    "license": "MIT",
    "authors": {
        "Shai Mishali": "[email protected]"
    },
    "platforms": {
        "ios": null
    },
    "source": {
        "git": "https://github.com/freak4pc/UIWebView-Blocks.git",
        "tag": "v1.0"
    },
    "source_files": "UIWebView+Blocks.**",
    "exclude_files": "UIWebView-BlocksExample/**",
    "requires_arc": true
}

Pin It on Pinterest

Share This