diff options
Diffstat (limited to 'CyteKit')
-rw-r--r-- | CyteKit/WebViewController.h | 1 | ||||
-rw-r--r-- | CyteKit/WebViewController.mm | 8 |
2 files changed, 7 insertions, 2 deletions
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 { |