Deprecated, please use RxCocoa
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.
Request blocks for UIWebView. The blocks are automatically removed once they UIWebView is gone, so it isn't necessary to clean up - Swizzle Free(™)
pod 'SHWebViewBlocks'
Put this either in specific files or your project prefix file
#import "UIWebView+SHWebViewBlocks.h"
or
#import "SHWebViewBlocks.h"
#pragma mark -
#pragma mark Helpers
-(void)SH_loadRequestWithString:(NSString *)theString;
#pragma mark -
#pragma mark Block Def
typedef void (^SHWebViewBlock)(UIWebView * theWebView);
typedef void (^SHWebViewBlockWithError)(UIWebView * theWebView, NSError * theError);
typedef BOOL (^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;
If you end up using SHWebViewBlocks in a project, I'd love to hear about it.
email: [email protected]
twitter: @seivanheidari
SHWebViewBlocks is © 2013 Seivan and may be freely
distributed under the MIT license.
See the LICENSE.md
file.