SHWebViewBlocks 1.3.1

SHWebViewBlocks 1.3.1

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Seivan Heidari.



  • By
  • Seivan Heidari

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

Helpers

Properties

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
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;

Contact

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

email: [email protected]
twitter: @seivanheidari

License

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