Skip to content

Commit 17a1378

Browse files
committed
Fixed up formatting a little bit.
1 parent 8868dfb commit 17a1378

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

TOWebViewController/TOWebViewController.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@
127127
@property (nonatomic,copy) void (^modalCompletionHandler)(void);
128128

129129
/**
130-
Managing queries and navigation
130+
An optional block that when set, will have each incoming web load request forwarded to it, and can
131+
determine whether to let them proceed or not.
131132
*/
132133
@property (nonatomic,copy) BOOL (^shouldStartLoadRequestHandler)(NSURLRequest *request, UIWebViewNavigationType navigationType);
133134

TOWebViewController/TOWebViewController.m

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -692,16 +692,14 @@ - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)
692692
{
693693
BOOL shouldStart = YES;
694694

695+
//If a request handler has been set, check to see if we should go ahead
695696
if (self.shouldStartLoadRequestHandler)
696-
{
697-
shouldStart = self.shouldStartLoadRequestHandler(request, navigationType);
698-
}
697+
shouldStart = self.shouldStartLoadRequestHandler(request, navigationType);
699698

700699
//TODO: Implement TOModalWebViewController Delegate callback
701700

702701
//if the URL is the load completed notification from JavaScript
703-
if ([request.URL.absoluteString isEqualToString:kCompleteRPCURL] || !shouldStart)
704-
{
702+
if ([request.URL.absoluteString isEqualToString:kCompleteRPCURL] || !shouldStart) {
705703
[self finishLoadProgress];
706704
return NO;
707705
}

0 commit comments

Comments
 (0)