From e8eda555ed7af2b5b11455c1db937e5f4b2c0e3e Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 14 Mar 2011 02:39:15 -0700 Subject: Add -[CyteWebViewController setRequest:]. --- CyteKit/WebViewController.h | 1 + CyteKit/WebViewController.mm | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'CyteKit') diff --git a/CyteKit/WebViewController.h b/CyteKit/WebViewController.h index b6cd768..d779468 100644 --- a/CyteKit/WebViewController.h +++ b/CyteKit/WebViewController.h @@ -102,6 +102,7 @@ - (CyteWebView *) webView; +- (void) setRequest:(NSURLRequest *)request; - (void) setURL:(NSURL *)url; - (void) loadURL:(NSURL *)url cachePolicy:(NSURLRequestCachePolicy)policy; diff --git a/CyteKit/WebViewController.mm b/CyteKit/WebViewController.mm index 4b2116f..d7a8594 100644 --- a/CyteKit/WebViewController.mm +++ b/CyteKit/WebViewController.mm @@ -167,9 +167,13 @@ float CYScrollViewDecelerationRateNormal; ]; } -- (void) setURL:(NSURL *)url { +- (void) setRequest:(NSURLRequest *)request { _assert(request_ == nil); - request_ = [self requestWithURL:url cachePolicy:NSURLRequestUseProtocolCachePolicy]; + request_ = request; +} + +- (void) setURL:(NSURL *)url { + [self setRequest:[self requestWithURL:url cachePolicy:NSURLRequestUseProtocolCachePolicy]]; } - (void) loadURL:(NSURL *)url cachePolicy:(NSURLRequestCachePolicy)policy { -- cgit v1.2.3