Skip to content
This repository was archived by the owner on Nov 12, 2024. It is now read-only.

Repository files navigation

Deprecated, please use RxCocoa

SHWebViewBlocks

CI StatusVersionPlatformLicense

This pod is used by SHUIKitBlocks as part of many components covering to plug the holes missing from Foundation, UIKit, CoreLocation, GameKit, MapKit and other aspects of an iOS application's architecture.

Overview

Request blocks for UIWebView. The blocks are automatically removed once they UIWebView is gone, so it isn't necessary to clean up - Swizzle Free(™)

API

Installation

pod'SHWebViewBlocks'

Setup

Put this either in specific files or your project prefix file

#import"UIWebView+SHWebViewBlocks.h"

or

#import"SHWebViewBlocks.h"

API

Helpers

#pragma mark -
#pragma mark Helpers
-(void)SH_loadRequestWithString:(NSString *)theString;

Properties

#pragma mark -
#pragma mark Block Def
typedefvoid (^SHWebViewBlock)(UIWebView * theWebView);
typedefvoid (^SHWebViewBlockWithError)(UIWebView * theWebView, NSError * theError);
typedefBOOL (^SHWebViewBlockWithRequest)(UIWebView * theWebView, NSURLRequest * theRequest,UIWebViewNavigationType theNavigationType);
#pragma mark -
#pragma mark Properties
#pragma mark -
#pragma mark Setters
-(void)SH_setShouldStartLoadWithRequestBlock:(SHWebViewBlockWithRequest)theBlock;
-(void)SH_setDidStartLoadBlock:(SHWebViewBlock)theBlock;
-(void)SH_setDidFinishLoadBlock:(SHWebViewBlock)theBlock;
-(void)SH_setDidFailLoadWithErrorBlock:(SHWebViewBlockWithError)theBlock;
#pragma mark -
#pragma mark Getters
@property(nonatomic,readonly) SHWebViewBlockWithRequest SH_blockShouldStartLoadingWithRequest;
@property(nonatomic,readonly) SHWebViewBlock SH_blockDidStartLoad;
@property(nonatomic,readonly) SHWebViewBlock SH_blockDidFinishLoad;
@property(nonatomic,readonly) SHWebViewBlockWithError SH_blockDidFailLoadWithError;

Contact

If you end up using SHWebViewBlocks in a project, I'd love to hear about it.

email: seivan.heidari@icloud.com
twitter: @seivanheidari

License

SHWebViewBlocks is © 2013 Seivan and may be freely distributed under the MIT license. See the LICENSE.md file.

About

Blocks for UIWebView request callbacks - swizzle and libffi free!

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages