forked from BlocksKit/BlocksKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUIWebView+BlocksKit.h
More file actions
executable file
·35 lines (23 loc) · 1.08 KB
/
Copy pathUIWebView+BlocksKit.h
File metadata and controls
executable file
·35 lines (23 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//
// UIWebView+BlocksKit.h
// %PROJECT
//
#import "BKGlobals.h"
/** Block callbacks for UIWebView.
Includes code by the following:
- Zach Waldowski. <https://github.com/zwaldowski>. 2011. MIT.
@warning UIWebView is only available on iOS or in a Mac app using Chameleon.
*/
@interface UIWebView (BlocksKit)
/** The block to be decide whether a URL will be loaded.
@warning If the delegate implements webView:shouldStartLoadWithRequest:navigationType:,
the return values of both the delegate method and the block will be considered.
*/
@property (nonatomic, copy) BOOL(^shouldStartLoadBlock)(UIWebView *, NSURLRequest *, UIWebViewNavigationType);
/** The block that is fired when the web view starts loading. */
@property (nonatomic, copy) void(^didStartLoadBlock)(UIWebView *);
/** The block that is fired when the web view finishes loading. */
@property (nonatomic, copy) void(^didFinishLoadBlock)(UIWebView *);
/** The block that is fired when the web view stops loading due to an error. */
@property (nonatomic, copy) void(^didFinishWithErrorBlock)(UIWebView *, NSError *);
@end